I would like to publish the number of listings that are created on my website. So if some people add listings a new visitor could read that on my website are already xx listings... Is there any shortcode for this?
If you have categories displayed on home page or in widget it usually says how many listings in each category, automatically.
Hi… you are right… but I would like to use the whole number of entries of all
There isn’t an existing shortcode that I know of…Are you sure you need a shortcode? Where will you put this?
I had this before already on my website but since I am reinstalling my website right now cause of a system crash…. There is no existing shortcode but it was a short string that will give out the number of all listings… I just cant find it anymore.
The purpose is that new visitors will always see how many complete listings are already submitted…I would like to put this within the fancy note (textbox)on the left side….
There is a thread in the Coupon forum similar to this, and they solved it for the coupon theme. You might give it a try, looks like it could be adapted to your needs.
How to display total number of coupons added
There you go…it will be listing_type instead of coupon_type
@Ian, works pretty well, thanks.
Thank you very much…but unfortunately it doesnt work on my end…. I used two different php widgets but it only showed me the echo text but not the counted number…
$count_posts = wp_count_posts('listing_type');
$totallistings = $count_posts->publish;
echo 'Total number of listings: '.$totallistings;
Anyways… before I received a short code like the first line but it wasnt php… It did show directly the number of all listings so I could write it in the fancy notice widget 🙁
As far as I recall the fancy notice widget just shows the text you type in…
@Rainer, this code works for me
$totalcoupons = wp_count_posts('listing_type')->publish;
Now serving <? echo $totalcoupons; ?> ad listings
I use PHP Code Widget plugin
Yes that fancy text box dont work with php… but I got a code in  or variables (only 3 or 4 words) and it give out the number of total listings w/in the fancy text… Too bad I cant remember that code but I got it also here in the forum…. Its already longer than 1 year ago, so its not anymore listed here 🙁
Thanx again… I used already exactly that plugin and tried it with your code… but its still just showing the text “Now serving ad listings” w/out any number.
I have created a plugin that will add a shortcode that can be used in most places on the site which will display the following:
count listings added today
count listings added this week
count listings added this month
count listings in total
count total categories
count total stores (when this taxonomy is present)
Hope this will be of use.
Wide range of WordPress Plugins
Premium and Free PremiumPress plugins and add-ons
Newly released collection of Responsive Themes plugins
PremiumPress customisation services and Website Design
Selection of PremiumPress Child Themes
Welcome back 🙂