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 » New Versions, & Updating »

Making Atahualpa WP 3.0-ready for new menu function


  #1  
Old May 19, 2010, 07:53 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I attended the NYC Wordpress Meetup last night, where 3.0 was outlined for us. I had already been testing 3.0beta2, so I knew about the new menu function. Essentially, it lets you combine pages, posts and outside URLs in one menu. If your theme is compliant, you can put the menu in the horizontal menu bar below the header. If the theme doesn't support this, you can use the menu as a sidebar widget.

I hope Flynn will make Atahualpa 3.4.9 support this wonderful feature. I'm sure he can figure it out from the Twenty-Ten theme, which is the new Wordpress default theme (no more Kubrick). This is some code from the new functions.php file. I'm not a PHP coder so this may not be all that's needed:
Code:
if ( ! function_exists( 'twentyten_page_menu_args' ) ) :
/**
 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link
 */
function twentyten_page_menu_args($args) {
    $args = array(
        'sort_column' => 'menu_order, post_title',
        'menu_class'  => 'menu',
        'echo'        => true,        
        'show_home' => true        
    );
    return $args;
}
add_filter('wp_page_menu_args', 'twentyten_page_menu_args');
endif;
  #2  
Old May 22, 2010, 02:19 PM
KatyDigg's Avatar
KatyDigg
 
319 posts · Jul 2009
Thank you, Paula

For valuable info!
  #3  
Old May 31, 2010, 07:58 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
if you want to play with this new menu's here is an UNSUPPORTED change you can make to Atahualpa 3.5.1 so you can mess around with the new menus
1) edit function.php and change the last line (line 777) from
HTML Code:
?>
to
HTML Code:
add_theme_support( 'nav-menus' );
?>
2) edit header.php and change line 64 from
HTML Code:
		<?php bfa_header_config($bfa_ata['configure_header']); ?>
to
HTML Code:
		<?php bfa_header_config($bfa_ata['configure_header']); ?>
<?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>
this will put the menu after Atahualpa's header in a <div class="menu-header"> that you can style.

This code will give you the first menu you defined, if you want another menu, change the line to
HTML Code:
		<?php bfa_header_config($bfa_ata['configure_header']); ?>
<?php wp_nav_menu( array( 'menu' => 'Project Nav', 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>
where 'Project Nav' is the name of your menu
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old May 31, 2010, 08:18 AM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Close, but no cee-gar. I get this: http://gyazo.com/a46c3c654edec18528212c167263d643.png

I had gotten the same result a different way, but adding
Code:
// This theme uses wp_nav_menu()
add_theme_support( 'nav-menus' );
to functions.php, and
Code:
<php wp_nav_menu( 'id=navbar&menu_class=headermenu' ); ?>
to the theme options header config area after %image. Same thing happens in both cases: you get a vertical menu, not a horizontal menu bar. You can see the way the sidebar widget looks in the right sidebar.
  #5  
Old May 31, 2010, 08:45 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Eithor way will work. The ''container_class' => 'menu-header'' or 'menu_class=headermenu' specifies the class=.... that will be assigned to the menu, now you need to create the CSS to display it the way you want.

You can add CSS to style it using
.menu-header {.....} (or .headermenu {...} in your case)
and style it how you want. It won't pick up Atahualpa's menu styling you need to add your own for now
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; May 31, 2010 at 08:47 AM.

Bookmarks

Tags
new menu function, twenty-ten theme, wordpress 3.0



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Page Menu Bar transparent? Hedgie Page & Category Menu Bars 10 May 19, 2014 07:28 AM
SwitchLang Function Lyryanne Atahualpa 3 Wordpress theme 0 Feb 2, 2010 05:46 AM
[SOLVED] Main Navigation - making pages menu bigger and bolder leifkendall Header configuration & styling 6 Oct 2, 2009 08:17 AM
Making Copies of Atahualpa Configs Steve_T New Versions, & Updating 0 Feb 22, 2009 11:35 AM
Making menu bar links shorter gesman Page & Category Menu Bars 2 Feb 8, 2009 09:52 PM


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


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