Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Combining Category & Pages menu (http://forum.bytesforall.com/showthread.php?t=139)

Masselyn Jan 29, 2009 09:21 PM

Combining Category & Pages menu
 
Hello :

First, I want to say this has got to be the best theme out there. Customization is a joy, not to mention often a breeze. I do have one question, and forgive me if this was posted elsewhere (I looked...but that doesn't mean I didn't miss it). Is there a way to combine the two menus into one? I would like to have a category choice on the menu, which drops down and shows the categories...and then continue to have my pages, home, and other links.

Just wondering....thanks.

Masselyn.

Flynn Jan 30, 2009 05:53 AM

This may lead to unexpected results, I have not tested it

In functions/bfa_header_config.php, line 22, find

PHP Code:

$page_menu_bar .= bfa_hor_pages($bfa_ata_sorting_page_menu_bar$bfa_ata_levels_page_menu_bar$bfa_ata_titles_page_menu_bar$bfa_ata_exclude_page_menu_bar); 

and add this right after it (or right before it, to have the category links on the left):
PHP Code:

$page_menu_bar .= bfa_hor_cats($bfa_ata_sorting_cat_menu_bar$bfa_ata_levels_cat_menu_bar$bfa_ata_titles_cat_menu_bar$bfa_ata_exclude_cat_menu_bar); 

At Atahualpa Theme Options -> Header add only the page menu bar (%pages)

At Atahualpa Theme Options -> Page Menu Bar configure options for the menu tabs that are pages, and visual styles for all menu tabs

At Atahualpa Theme Options -> Category Menu Bar configure options for the menu tabs that are categories. The visual styles will be covered by the settings of Page Menu Bar

Masselyn Jan 30, 2009 10:17 AM

Absolutely wonderful! Thank you so much for the quick reply, as well as the great advice. I will test it across browsers, to make sure it is stable. Very cool!

bcorrigan Mar 4, 2009 12:07 PM

What I did for the left menu bar was to create a text Widget and add
Template tags, wp_list_pages() & wp_list_categories (), with options and put them in an unordered list. This technique doesn't involve editing Flynn's great pages, so when you update your theme, you'll won't have to worry about over-writing the .php files.
You then style the list in the Widget section of Atahualpa Theme options.

More information about these tags are at: http://codex.wordpress.org/wp_list_pages, and http://codex.wordpress.org/Template_...ist_categories.

Here's my code in a text widget in the left sidebar.
<ul>
<?php wp_list_pages('sort_column=menu_order&include=3,7, 267,585&title_li='); ?>

<?php wp_list_categories('orderby=ID&exclude=145,211,215 ,230,240,260,265,270,280,290,295&title_li='); ?>

<?php wp_list_pages('sort_column=menu_order&include=2,10 1,667&title_li='); ?>

</ul>

markus Mar 22, 2009 11:03 AM

hi.
it seems it has to be a php-text widget.
with the pure text widget it did not work.
i found one here: http://wordpress.org/extend/plugins/php-code-widget/
cheers markus

molge Jun 14, 2009 09:46 AM

Quote:

Originally Posted by Flynn (Post 569)
This may lead to unexpected results, I have not tested it

In functions/bfa_header_config.php, line 22, find

PHP Code:

$page_menu_bar .= bfa_hor_pages($bfa_ata_sorting_page_menu_bar$bfa_ata_levels_page_menu_bar$bfa_ata_titles_page_menu_bar$bfa_ata_exclude_page_menu_bar); 

and add this right after it (or right before it, to have the category links on the left):
PHP Code:

$page_menu_bar .= bfa_hor_cats($bfa_ata_sorting_cat_menu_bar$bfa_ata_levels_cat_menu_bar$bfa_ata_titles_cat_menu_bar$bfa_ata_exclude_cat_menu_bar); 

At Atahualpa Theme Options -> Header add only the page menu bar (%pages)

This works fine for me, the categories pops up in the menu. Just one thing doesnt work, the highlight of the category when you clicked on it. This works with pages, if you go to a page lets say "about" then "about" is highlighted, but if you go to a category-menu-textlink lets say "fruits", then "fruits" is not highlighted.

Is there any solution to this?

/molge

hamcake Jul 24, 2009 10:11 AM

I have used this method to combine the page and category menus, works fine - except - the category menu items are no longer listed in the order that I specified using the My Category Order plugin. Also, the categories that I specified to be excluded from the menu bar (uncategorized, etc) are still showing up.

Any ideas?

hamcake Jul 25, 2009 01:16 PM

Also, now that the menus are combined it seems the ATO settings for the category bar are ignored - I'd like to be able to restrict the submenu level but at the moment it is showing everything.

Puck Aug 4, 2009 05:52 PM

*bump*
I think this is a great solution, but I have the same issues with 'My Category Order'. Has anyone come up with a solution for this? Thanks a lot!

Puck Aug 4, 2009 06:13 PM

update: i didn't fix the problem, but i found an acceptable workaround.
the categories appear in the order in which they were created, so i just created doubles of my categories (in the order in which i wanted them to appear), and transferred my subcategories & posts to the new (properly-ordered) categories. only took a couple of minutes.

Whatsthatcat? Feb 27, 2010 04:28 PM

Quote:

Originally Posted by Flynn (Post 569)
This may lead to unexpected results, I have not tested it

In functions/bfa_header_config.php, line 22, find

PHP Code:

$page_menu_bar .= bfa_hor_pages($bfa_ata_sorting_page_menu_bar$bfa_ata_levels_page_menu_bar$bfa_ata_titles_page_menu_bar$bfa_ata_exclude_page_menu_bar); 

and add this right after it (or right before it, to have the category links on the left):
PHP Code:

$page_menu_bar .= bfa_hor_cats($bfa_ata_sorting_cat_menu_bar$bfa_ata_levels_cat_menu_bar$bfa_ata_titles_cat_menu_bar$bfa_ata_exclude_cat_menu_bar); 

At Atahualpa Theme Options -> Header add only the page menu bar (%pages)

At Atahualpa Theme Options -> Page Menu Bar configure options for the menu tabs that are pages, and visual styles for all menu tabs

At Atahualpa Theme Options -> Category Menu Bar configure options for the menu tabs that are categories. The visual styles will be covered by the settings of Page Menu Bar

Hey Flynn! Great theme, I was wondering if you could take a look at my site, I have combined the categories into the page menubar as you instructed above, but suddenly it displays "no categories" after the pages. Like it says those words.

http://www.rogersayre.com/

Thanks for all your help!

juggledad Feb 28, 2010 11:09 AM

what version of Atahualpa and WP?
Where (what line number) did you add the code?

in 3.4.6 try using this instead
HTML Code:

        $page_menu_bar .= bfa_hor_cats($bfa_ata['sorting_cat_menu_bar'], $bfa_ata['order_cat_menu_bar'],
        $bfa_ata['levels_cat_menu_bar'], $bfa_ata['titles_cat_menu_bar'], $bfa_ata['exclude_cat_menu_bar']);


Whatsthatcat? Mar 2, 2010 05:07 PM

I'm using WP 3.4.6 and Atahualpa 3.4.6 also. Juggledad, I added what you suggested and it fixed the issue! In 3.4.6 it's line 43 where you would add it, FYI.


All times are GMT -6. The time now is 05:55 PM.

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