Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 04: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 05: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 06:05 PM
[SOLVED] How Do You Add Extra Space Between Category or Page Menu Items? rhythm Page & Category Menu Bars 4 Mar 15, 2010 03:08 PM
How to add latest post in one category to a static front page alonkka Center area post/pages 1 Feb 8, 2010 08:52 AM
Add static page to the Category Menu Bar jkfly4 Page & Category Menu Bars 1 Jan 12, 2010 08:00 PM
Add second category menu bar? paulae Page & Category Menu Bars 2 Mar 23, 2009 09:51 PM

All times are GMT -6. The time now is 04:16 AM.

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