About This Ticket

Menu on Blog and other pages

by jamin100 / November 25, 2015, 7:49 pm

Hi, 

Im trying to get the header menu items that apear on the main page to apear on every page including the blog. At the minute if i click on a blog post the only menu choices i get are Home and one other that I have created myself. 

Can you tell me what i need to do in order to get the full menu to apear?

Many thanks

Ben

 

Staff

Hi

To do this, you need to modify two files

1. Remove lines 46 and 52 in file header.php.

2. Remove lines 67, 77-80 in file js/custom.js.

Thanks for getting back to me. I have made the changes you suggested but it hasnt seemed to work. It breaks the styling on the menu and puts all the links on the left hand side. - Screen shots attached

Staff

So somewhere error with lines. Of all the functions, leave this code in custom.js

$('#section_menu').children().each(function(i, e){
                if($('#main-menu div ul li').is($(e).insertAfter('#main-menu div ul li:eq(0)'))){
                    $(e).insertAfter('#main-menu div ul:eq(0)');
                }
                if( !$('#fr_alignment:empty') ){
                    $(e).appendTo('#fr_alignment ul');
                }
                $('#main-menu div ul li:eq(0) a:eq(0)').attr("href","#main_header");
            });

Thank you for your help. I really appreciate it.

Is that code already in the custom.js or do i need to add it in?

Staff

Already in the custom.js

Thanks. Ive had a look but its still behaving the same. Here is part of my custom.js

        $('.js #main-menu').show();

            $('#section_menu').children().each(function(i, e){
                if($('#main-menu div ul li').is($(e).insertAfter('#main-menu div ul li:eq(0)'))){
                    $(e).insertAfter('#main-menu div ul:eq(0)');
                }
                if( !$('#fr_alignment:empty') ){
                    $(e).appendTo('#fr_alignment ul');
                }
                $('#main-menu div ul li:eq(0) a:eq(0)').attr("href","#main_header");
            });

        }

Right, ignore the last comment. I removed the last } and it is now displaying as it should. However nothing happens when you click the links when not on the main front page. 

For example, im on a blog post and can now see the full navigation menu at the top. When i click any of the links, nothing happens - no error pages or 404s  it just stays on the same page

Never mind, ive figured it out..

I edited lines 47-51 in header.php to add my domain into the link..

Thanks for all your help. I may be back with more qestions!!