Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Adding a second menu to breadcrumbs (http://forum.bytesforall.com/showthread.php?t=20339)

manunu May 16, 2013 10:03 AM

Adding a second menu to breadcrumbs
 
Hi, everyone,

In my last post i cand understand something about his awesome theme, but now i modify for adding a Secondary Menu, For this, i delete some lines of code in the breadcrumbs.php file, but my problem is i don't know how i can call the second menu.

Thanks again

jerryc May 16, 2013 10:08 AM

Did you look in the limited code?

manunu May 16, 2013 10:21 AM

Where? This is my new breadcrumbs.php file

Code:

<?php function bfa_breadcrumbs($id = '', $home = '&nbsp;', $sep = '' ) {

        global $post, $wp_query, $author;
       
        $before = '<span class="bc-current">';
        $after = '</span>';
       

        # if ( is_home() OR is_front_page() )  { $sep = ""; }

        echo '<ol><li class="bc-home"><a href="' . home_url() . '">' . $home . '</a></li>';


        if ( is_category() ) {
                $cat_obj = $wp_query->get_queried_object();
                $thisCat = $cat_obj->term_id;
                $thisCat = get_category($thisCat);
                $parentCat = get_category($thisCat->parent);
                if ($thisCat->parent != 0)
                        echo '<li>' . get_category_parents($parentCat, TRUE, "</li><li>") ;
                else echo '<li>';
                echo $before . single_cat_title("", false) . $after . '</li>';
               
        } elseif ( is_day() ) {
                echo '<li><a href="' . get_year_link(get_the_time("Y")) . '">' . get_the_time("Y") . '</a></li>';
                echo '<li><a href="' . get_month_link(get_the_time("Y"),get_the_time("m")) . '">' . get_the_time("F") . '</a></li>';
                echo '<li>' . $before . get_the_time("d") . $after . '</li>';
               
        } elseif ( is_month() ) {
                echo '<li><a href="' . get_year_link(get_the_time("Y")) . '">' . get_the_time("Y") . '</a></li>';
                echo '<li>' . $before . get_the_time("F") . $after . '</li>';
               
        } elseif ( is_year() ) {
                echo '<li>' . $before . get_the_time("Y") . $after . '</li>';
       
        } elseif ( is_home() ) {
/*        BORRADO INTENCIONALMENTE        echo '<li>' . $before . __( 'Blog', 'montezuma' ) . $after . '</li>'; */
        }
       
/* BORRADO INTENCIONAL
        if ( get_query_var('paged') ) {
                echo '<li class="bc-pagenumber">';       
                if ( is_category() OR is_day() OR is_month() OR is_year() OR is_search() OR is_tag() OR is_author() )
                        echo ' (';
                echo 'Page ' . get_query_var('paged');
                if ( is_category() OR is_day() OR is_month() OR is_year() OR is_search() OR is_tag() OR is_author() )
                        echo ')';
                echo '</li>';
        }
        */

       
        echo '</ol>';
       
       
}

but in the theme options if possible put 2 menus, in the zone where is the Home icon i want to put a secondary menu.

jerryc May 16, 2013 11:12 AM

Go to dashboard > appearance > mz options, and in the upper right there's a tab for the limited code

manunu Jun 11, 2013 07:59 AM

Hi Again,

Sorry for the time, I made some changes to my montezuma theme, but i can't change the place where is the "house icon" with the navigation. I just want to put a menu in that place (in fact, i need two menus in my site, the principal with icons, and a secondary with another information or tags, and the better place for that is where is the house icon).

That is only what i need, help please :(

Best regards,

CrouchingBruin Jun 11, 2013 12:25 PM

You don't need to edit breadcrumbs.php if you want to remove the breadcrumbs line. What you need to do is make a change in the virtual files, particularly to header.php. It's header.php that determines what your header looks like, including the logo, site title, and any menus that are place there.

From your Dashboard, go to Appearances > Montezuma Options > Subtemplates > header.php.

Remove the line that displays the breadcrumb (it should be at the bottom) and then add another wp_nav_menu call for menu2. As JerryC said, if you click on the gray tab in the upper right corner of the header.php page that is labeled Limited PHP Code, a help section will slide down and you should be able to find an example about how to call wp_nav_menu for your second menu.

After you've made the changes and are satisfied with it, read the documentation in the Main Templates and Subtemplates sections to get an idea as to how the virtual file system works, in case you want to make any further changes.


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

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