Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 31323

The core of the WordPress query, the loop offers an easy way to access post information and display it on your website.

4
votes
( $a, $b ) { return strcmp( $b->post_date, $a->post_date ); } ); Finally, do the loop: global $post; foreach ( $all_posts as $post ) { setup_postdata( $post ); // use the template tags here: the_title(), the_content(),… } wp_reset_postdata(); …
answered Dec 12 '13 by David
0
votes
Just loop over WP_Query::$posts to get the titles: $option_posts = new WP_Query( [ 'post_type' => 'organisationer' ] ); $options = []; foreach ( $option_posts->posts as $post ) { $key …
answered Feb 2 '16 by David
5
votes
First of all, I think it's possible to use get_posts() in combination with setup_postdata(). With these, you can use the template tags as in a normal WordPress loop. But you can use this function … () ) : $publication->the_post(); echo '<h2>Publication title = '.get_the_title().'</h2>'; $pub_id = get_the_ID(); # preserve the current post in the higher loop $preserve_post = get_post …
answered Dec 13 '13 by David
7
votes
all terms of your taxonomy and pass them as argument to your tax-query with the NOT IN operator. The second loop in your example should walk over the new WP_Query object. …
answered Aug 27 '14 by David