Fudge

  1. Home
  2. Docs
  3. Fudge
  4. Frequently Asked Questions
  5. How to Add an External link to the top menu.

How to Add an External link to the top menu.

A popular feature request is to have the top menu linking to external pages. While this can certainly be achieved, we want you to bear in mind:

– This is not how Fudge was conceived. Fudge is a one page theme, it carries all the information one single page. This has been proven to be particularly effective in driving up conversion rates.

– Adding a menu link won’t be straight forward and require some coding

– Menu items will always be displayed after the regular menu, managed by widgets, and specifically after the register button if you have it.

In order to have a menu item showing you need to change two files, header.php and the selected css stylesheet you are using.

1) Please always take a backup of the original file before editing.

2) Copy wp-content/themes/fudge/header.php file to child theme wp-content/themes/fudge-child

3) Open wp-content/themes/fudge-child/header.php and look for this line:

<?php if(in_array('fudge_registration', $sidebars_widgets['sidebar-1'])){?><liclass="register">
 <a class="btn-register secondary-bkg-color" title="<?php bloginfo('title');?>" href="<?php bloginfo('url');?>#registration"><?php echo get_option("fudge_registration_widget_menu");?></a></li><?php }?>

4) Add the following code after the line above: (near line number 67)

<li class="extra-menu"><a title="Link Title" href="http://www.google.com">NewLink</a></li>

The end result will look like:

<?php if(in_array('fudge_registration', $sidebars_widgets['sidebar-1'])){?><liclass="register">
                                       <a class="btn-register secondary-bkg-color" title="<?php bloginfo('title');?>" href="<?php bloginfo('url');?>#registration"><?php echo get_option("fudge_registration_widget_menu");?></a></li><?php }?><li class="extra-menu"><a title="Link Title" href="http://www.google.com">NewLink</a></li></ul>

Please navigate to Appearance->editor->style.css:

Open stylesheet and add the following code

.extra-menu {margin-left:0;}

Add it anywhere on the sheet after any closing }

If you have a ‘Register’ button – you will need at least 20px margin. The end result will be:

.extra-menu {margin-left:20px;}

7) If the “Register” button is present, there will be some spacing issues. So you need to adjust margin-left of the .extra-menu class.

Was this article helpful to you? Yes No