Monday 15 April 2013

php - Wordpress theme doesn't output more than one post per tag -


We created a Wordpress theme based on Blankslate theme. I see this in tag php :

   & Lt ;? Php rewind_posts (); Get_template_part ('nav', 'up'); While (is_paus ()) {the_post (); Get_template_part ('Entry'); } Get_template_part ('nav', 'bottom'); ? & Gt; & Lt; / Div & gt; & Lt ;? Php get_sidebar (); ? & Gt; & Lt ;? Php get_footer (); ? & Gt;   

For example we have multiple posted "document management" tags, but when we browse the tag, we can only see the latest post. What can I change to see all the posts for a given tag?

You must change the loop in WordPress, set some arguments like this and then WP_QUERY Pass the argument through

Easy

  $ args = array (post_type = & gt; 'post', Posts_per_page = & gt; 20 ', tax_coreia = & gt; array (array (' classification '= & gt;' class', 'rule = & gt; slug here' 'field' = & gt; 'slug') ,));); $ Query = wp_query ($ args)   

Then pass the query to the query such as

  while ($ query- & quot; is_post () : $ Query-> the_posts ();    

No comments:

Post a Comment