Ejemplo n.º 1
0
function wpsight_author_query($query)
{
    if (is_author() && $query->is_main_query() && !is_admin()) {
        // Get listing search query
        $args = wpsight_author_query_args();
        foreach ($args as $k => $v) {
            $query->set($k, $v);
        }
    }
    return $query;
}
Ejemplo n.º 2
0
?>
	    
	    	<?php 
if (have_posts()) {
    ?>
	    	
	    		<div class="title title-author clearfix"><?php 
    // Display current author
    echo apply_filters('wpsight_author_title', wpsight_listing_loop_title());
    // Action hook to add content to title
    do_action('wpsight_loop_title_actions');
    ?>
			    
			    </div><!-- .title --><?php 
    // Action hook to add content after archive title
    do_action('wpsight_listing_archive_title_after', wpsight_author_query_args(), $content_class);
    ?>
				
				<div class="row">
	    		
	    			<?php 
    // Create loop counter
    $counter = 0;
    while (have_posts()) {
        // Increase loop counter
        $counter++;
        the_post();
        // Include listing loop template
        get_template_part('loop', 'listing');
    }
    // endwhile have_posts()