Frontpage Forums Magaziner How to change the popular post from “Forever” to “One Week Ago”

  • How to change the popular post from “Forever” to “One Week Ago”


    CHABAL Gregory
    Participant

    You just have to change inc/front-popular.inc by this lines for the $popular part :

    <?php
    	$popular = new WP_Query( array(
    		'post_type'				=> array( 'post' ),
    		'showposts'				=> 3,
    		'ignore_sticky_posts'	=> true,
    		'orderby'				=> 'comment_count',
    		'order'					=> 'dsc',
    		'date_query' => array(
    			array(
    				'after' => '1 week ago',
    			),
    		),
    	) );
    ?>

    And… FRESH CONTENT IS HERE NOW !

  • You must be logged in to reply to this topic.

Once you purchase a product from alx.media, you will receive an account and access to the support forums.

Lost Password?

Topic Tags