Skip to content

Instantly share code, notes, and snippets.

@RalfAlbert RalfAlbert/snarfer.php
Last active Dec 14, 2015

Embed
What would you like to do?
Just a testcase
<?php
/*
Template Name: Snarfer
*/
global $wp_query;
$old_query = $wp_query;
query_posts('author=1');
echo '<ul>';
while ( have_posts() ) :
the_post();
echo '<li>'.get_permalink().'</li>';
endwhile;
echo '</ul>';
wp_reset_query();
var_dump( is_page() );
var_dump( $old_query === $wp_query );
var_dump( $wp_query );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.