Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, hmm by default WPAdverts does not have such feature, but you can try using following code for this

    $args = array(
        'post_type' => 'advert',
        'posts_per_page' => '1',
        'date_query' => array(
            'after' => '24 hours ago'
        )
    );
    $query = new WP_Query( $args );
    echo $query->found_posts;
    Thread Starter dynasty2014

    (@dynasty2014)

    Thanks very much Greg. Just one question: Where does this code go?

    Plugin Author Greg Winiarski

    (@gwin)

    You can add it to your theme functions.php file, or if you have some technical/programming knowledge you can create a new WP plugin and paste the code there.

    Thread Starter dynasty2014

    (@dynasty2014)

    Thanks again Greg!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Daily count of ads’ is closed to new replies.