• I wrote this code

    <?php 
    
    		$args = array("author" 		=> get_query_var('author'),
    				"post_type" 	=> array("post","gallery"),
    				"paged"		=> $paged,
    				"posts_per_page"	=> 10,
    				"orderby"	=> "date",
    				"order"		=> "DESC");
    
    		$myQuery = new WP_Query($args);
    
    		?>
    			<?php if ($myQuery->have_posts()) : while ($myQuery->have_posts()) : $myQuery->the_post(); ?>
    				<?php get_template_part(THEME_LOOP."author"); ?>

    but if i dump the variable $post in author php file it is the primary query result… someone can tell me where am i wrong?
    Thank you

  • The topic ‘My query isn't changing $post in theme_loop/author.php’ is closed to new replies.