This is built into wordpress i.e
$count_posts = wp_count_posts( ‘listing_type’ )->publish;
turn it into a shortcode:
<?php // Display published Listings using the shortcode [published-listings] function wb_published_listings() { return wp_count_posts('listing_type')->publish; } add_shortcode('published-listings', 'wb_published_listings');
This reply is for PremiumPress customers only.
1,269
Views
40
Replies
Copyright © 2010-2024 PremiumPress Limited.
This is built into wordpress i.e
$count_posts = wp_count_posts( ‘listing_type’ )->publish;
turn it into a shortcode:
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now