WordPress.org

Ready to get started?Download WordPress

Forums

WP3.0 Menus: show amount of posts after TAGs (1 post)

  1. cogmios
    Member
    Posted 3 years ago #

    I have placed some TAG pages in the new WordPress Menus.

    I want to show behind the tags IN the menu the amount of postings that are related to the tags (like in my previous menu).

    so e.g. "WordPress (23 postings)"

    The amount is not so difficult:

    function fetch_tag_amount($tagid) {
    	global $wpdb;
    	$amount = $wpdb->get_var("SELECT count FROM $wpdb->term_taxonomy WHERE term_id=" . $tagid);
    	return $amount;
    }

    but placing it in the menu is LOL, Is there some filter that I can call that checks IF an item leads to a tag page and IF it is a tag page then calls the above function to append to the item?

Topic Closed

This topic has been closed to new replies.

About this Topic