wp_reset_query [ WordPress Function ]
| Uses: |
|
| Defined at: |
|
Destroy the previous query and set up a new query.
This should be used after {@link query_posts()} and before another {@link query_posts()}. This will remove obscure bugs that occur when the previous wp_query object is not destroyed properly before another is set up.
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_reset_query - WordPress Codex
Description. This function destroys the previous query used on a custom Loop. Function should be called after The Loop to ensure conditional tags work as ...
codex.wordpress.org - Conditional Tags « WordPress Codex
The trick is to put wp_reset_query before the conditional test in the footer. For example: <?php wp_reset_query(); if ( is_page( '2' ) ) { echo 'This is page 2!'; } ?> ...
codex.wordpress.org - Undocumented Wordpress Query Function: wp_reset_query()
Feb 26, 2009 ... Creating a conditional sidebar widget in Wordpress turned into an odyssey of discovery. How an obscure usage of query_posts will bork your ...
webstractions.com - Is it necessary to use wp_reset_query() in a WP_Query call?
Jan 29, 2011 ... What follows is what the PHP code for the function wp_reset_query() from /wp- includes/query.php in WordPRess v3.0.4 as well as the functions ...
wordpress.stackexchange.com
Gebruikersdiscussies [ wordpress.org ]
- KatieBen on "How are page preview and a live page different? (needed to troubleshoot)"
- KatieBen on "How are page preview and a live page different? (needed to troubleshoot)"
- itzsnider on "Featured Posts Code - Repeated featured posts"
- alchymyth on "Featured Posts Code - Repeated featured posts"
- itzsnider on "Featured Posts Code - Repeated featured posts"
- poliquinp on "Get the_content() of a post into a single post"
- poliquinp on "Get the_content() of a post into a single post"
- Spencer Hill on "Post excerpts are repeating, need help..."
- Nerx on "Post excerpts are repeating, need help..."
- Spencer Hill on "Post excerpts are repeating, need help..."