Viewing 9 replies - 1 through 9 (of 9 total)
  • Another post to reference

    Hope that helps. Upper right “Screen Options” —> “Show advanced menu properties” —> “Link Target”

    Thread Starter mpitts

    (@mpitts)

    Sorry, didn’t work. Take a look. http://www.bgproonline.com/home

    It is the blog link in the top navigation

    Try adding “http://” in front of the link.

    Thread Starter mpitts

    (@mpitts)

    Did that as well.

    Disregard that. You are getting an error in the console when you click on an external link. Looks like an issue with that specific theme.

    This is from the comments section on themeforest:

    Another user emailed me privately but forgot to include their email address asking how to link to internal / external pages from the main menu navigation (e.g. you build custom page templates to create additional pages and want to link them from the main nav).

    Here is how it was accomplished for that user and any others that want to know:
    You just have to modify the “custom.js” file – line 205 under the “Smooth Page Scroll” section and just comment that line out:
    Also at one’s own risk until we hear back from GUU, but I went through line by line and I got mine to work while maintaining the smooth scroll by commenting just the one line at 205 – “event.preventDefault();”

    if ($(‘body’).hasClass(‘home’)) { $(”.menu li.menu-item > a”).addClass(‘scroll’); }

    $(”.scroll”).click(function (event) { <!-event.preventDefault();->

    Themeforest Link

    If that doesn’t resolve it I would try contacting the theme developer directly.

    Thread Starter mpitts

    (@mpitts)

    It worked, however I get a weird jerking of the theme now. For instance, when I click on a top navigation item it scrolls down, jumps to the top, then back down again. Weird. The author is of no help, they refuse to assist with anything that customizes the theme.

    Thread Starter mpitts

    (@mpitts)

    Figured it out!

    I updated the “Smooth Page Scroll” section to the below code.

    if ($('body').hasClass('home')) {
            $(".menu li.menu-item > a").addClass('scroll');
        }   
    
        $(".scroll").click(function (event) {
    
            var full_url = this.href;
            var parts = full_url.split("#");
            if(parts[1]){
    		    var trgt = parts[1];
    		    var target_offset = $("#" + trgt).offset();
    		    if(target_offset){
    			 	event.preventDefault();
    				var target_top = target_offset.top;
    
    				$('html, body').animate({
    				    scrollTop: target_top
    				}, 500);
    		    }
            }
        });

    Awesome!

    Thread Starter mpitts

    (@mpitts)

    Thanks, I just needed to be pointed to the right section. I am pretty good with JS. Thanks for your help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add an External URL to Navigation’ is closed to new replies.