bdbrown on "Display number of posts within category type"

ساخت وبلاگ

JulieMarie
Member
Posted 7 hours ago #

I found this post: https://wordpress.org/support/topic/display-number-of-posts-within-category?replies=4
it seems to be the correct path however, I need to use the following snippet to result the 249 posts within a post type Premium Recipes. The result was empty when I tried The code:

<php
$a = query_posts('recipe_type=premium-recipes&post_type=recipe'); $result = count($a); echo $result;
?>

The following snippet also results 10 when it should result 144

<php
$a = query_posts('category_name=premium-archives'); $result = count($a); echo $result;
?>

How do I create a snippet that will result the number of posts within the premium-archives category and a snippet that will result the number of posts within the post_type=recipe and recipe category recipe_type=premium-recipes?
I don't think it should be too difficult however I'm obviously doing something incorrectly. Thank you in advance for your assistance.

bdbrown
Member
Posted 3 minutes ago #

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 289 تاريخ : شنبه 9 مرداد 1395 ساعت: 11:31