Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Sep 1, 2010, 03:23 PM
manuhoz
 
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);

done

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

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

Bookmarks

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 12:25 PM.


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