How can I add php count of all results this selection:
<?php
$current_tag = single_tag_title(“”, false);
query_posts(array(
‘cat’=>’29,27,11,32,35,9,58,54,39’,
‘showposts’=>’2’,
‘tag_slug__and’=>array($current_tag),
) );
?>
I want to show some link if there are more than 2 posts.
Many thanks for help
]]><?php if ( 0 == count_user_posts( get_current_user_id() ) && is_user_logged_in() ) { ?>
do something
<?php } else { ?>
do something else
<?php endif; ?>
Thanks,
Pete
function pcig_generate_category_tree_array($category_id,$params)
add after the line: if($show_category){
$countPosts = null;
if(in_array("count",$params['show'])){
$countPost = " (" . $subcategory->count .") ";
}
if(in_array("subcategory_name",$params['links'])){
$subcategory_name = "<a href=\"".get_category_link($subcategory->term_id)."\" class=\"pcig-subcategory-link\" title=\"".$subcategory->name."\">".$subcategory->name.$countPost."</a>";
}else{
$subcategory_name = $subcategory->name.$countPosts;
}
do the same for
function pcig_generate_category_list_array($category_id,$params)
the the short code
use show=count to display the number of posts within the subcategory.
https://www.ads-software.com/extend/plugins/post-category-index-generator/
]]>