Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

[SOLVED] How to add a post counter to the category menu

Old Sep 1, 2010, 03:23 PM
15 posts · Jul 2010
I posted questions to add a counter in the categories menu, for each category, and I finally found a way to do it, with the help of the forums.

When it's finish it's pretty easy, you can see the result on my blog : http://www.radiatorhymn.com

you just have to modify with the editor the bfa_hor_cats.php

and recognize and replace the following line : (which activate the counter but display it under the menu)

$list_cat_string = wp_list_categories('&show_count=1&orderby=' . $sort_order . '&order=' . $order . '&title_li=&depth=' . $levels . '&exclude=' . trim(str_replace(" ", "", $exclude)) . '&echo=');

then after all the preg_replace lines, add these two ones : (which include the counter with the name of the category)

$list_cat_string = str_replace("</a>","",$list_cat_string);
$list_cat_string = str_replace(")",") </a>",$list_cat_string);


sorry for my poor english, I'm french... ah ah

Last edited by lmilesw; Sep 1, 2010 at 04:38 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Categories Menu, I want to add a Post counter in it, same as in the widget manuhoz Page & Category Menu Bars 5 Aug 29, 2010 05:05 PM
[SOLVED] How Do You Add Extra Space Between Category or Page Menu Items? rhythm Page & Category Menu Bars 4 Mar 15, 2010 02:08 PM
How to add latest post in one category to a static front page alonkka Center area post/pages 1 Feb 8, 2010 07:52 AM
Add static page to the Category Menu Bar jkfly4 Page & Category Menu Bars 1 Jan 12, 2010 07:00 PM
Add second category menu bar? paulae Page & Category Menu Bars 2 Mar 23, 2009 08:51 PM

All times are GMT -6. The time now is 08:12 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.