Skip to main content

Reply To: How to add counter to display total ads in classified at frontend.php?

ClassiBase classifieds script Forums General help How to add counter to display total ads in classified at frontend.php? Reply To: How to add counter to display total ads in classified at frontend.php?

#1141 Reply

ClassiBase
Keymaster

To display total number of live ads use following code.

<?php echo Ad::countByClass('Ad', 'listed=?', array(1));?>

Result are cached when using this method for 1 hour so do not worry about overloading database.

  • Classifieds Business Newsletter

    Get discounts and tips about growing your classifieds website.

    Subscribe