php - How do I add order & orderby parameters to this wordpress query? -


I used to paint myself in a corner while using this snippet, but how do I Can not manage query. Generally I can do this but the tag with this snippet does not include a tag on the page, can not I actually do any of this work?

  $ exclude_tags = array (17); Global $ wp_query; $ Wp_query- & gt; Set ('tag__not_in', $ Excluded_Tags); $ Wp_query- & gt; Get_posts (); If (is_pause ()): while (is_pause ()): the_post ();    

This example will help you complete: -

 < Code> $ args = array ('post_type' = & gt; 'post', 'meta_key' => 'pb_issue_featured', 'orderby' => 'meta_view', 'order' = & gt; , 'Posts_per_page' = '$ posts,' paged '= & gt; $ paged,' paged '=> 1,' meta_query '= & gt; array (array (' key '= & gt;' headline ' 'Value' = & gt; 1, 'compare' => '! ='))); Add_filter ('posts_orderby', 'filter_query'); $ Q = new WP_Query ($ Args); Remove_filter ('posts_orderby', 'filter_query'); Function filter_query ($ query) {$ query. = ', Wp_posts.menu_order ASC'; Return $ query; }   



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -