(2016-11-11, 05:53:15)Carlos Wrote:(2016-11-10, 08:06:50)Riianna Wrote: How about showing single tag of current news with post count, not the whole tag list.
Since NM 3.1 you can use<?php nm_single_tag_title(); ?>
to display the current tag if on a tag page.
To display the post count for the current tag, add this to your theme's functions.php file (create it if it doesn't exist):
PHP Code:if (!defined('nm_single_tag_count')) {
function nm_single_tag_count() {
$tag = nm_single_tag_title('', '', false);
if ($tag) {
$tags = nm_get_tags();
echo count($tags[$tag]);
}
}
}
and then you can display the number with:
Code:<?php nm_single_tag_count(); ?>
For example, you can do this in your template:
(so that the code is only run if on a tag page)PHP Code:<?php if (nm_is_tag()) { ?>
<?php nm_single_tag_title(); ?>: <?php nm_single_tag_count(); ?> post(s)
<?php } ?>
I may add that function to the plugin...
Great again thanx . Trying to "make" a website to a friend who needs "catalog" for few items and host has no mysql support, so cant use WP, and item manager is too complicated for her. So i try to use news manager as "very easy to use" catalog .
Also does News manager addons plugin have snippet to show all posts from current tag?.