WordPress.org

Forums

[resolved] CSS for menu links (5 posts)

  1. KylieMemoirs
    Member
    Posted 2 years ago #

    Hi there

    I have the main home - contact - about - press menus at the top of the page that all link to internal pages.

    http://www.memoirmode.com/

    If I wanted to change one of those menus to link to an external url, where would I find this in the CSS? or where would I write this in the CSS.

    Sorry it might be a bit of a dumb question, but I can't see how to do this anywhere

    Thank you in advance

  2. bknutson
    Member
    Posted 2 years ago #

    You wouldn't change the destination link in the CSS. CSS stands for Cascading Style Sheets - it's for styling your page.

    You would need to find which of the theme files your nav menu is in. It's probably in the header.php file.

    Change the href="" element of the appropriate a tag to whatever external site you want to link to. I would also suggest adding target="_blank", which will open the page in a new browser tab/window (personal preference) so your final tag would look something like this:

    <a href="link.to.external.site" target="_blank">Menu Item</a>
  3. KylieMemoirs
    Member
    Posted 2 years ago #

    Thanks for getting back to me.

    I think the problem is I can't find where the nav menu is. Hunted in all the files including the header.php file

    the closest I have found to what I think I should be altering is this piece in the header.php file

    <nav id="access" role="navigation">
    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    </nav><!-- #access -->

    I think I was looking for the html you have described above in the files and hoping I could just change the link.

    I am using Matala if that is any help.

    Thank you again

  4. bknutson
    Member
    Posted 2 years ago #

    Ah, the theme is generating this for you.

    I believe you can edit the menu items (and their URLs) on the Appearance -> Menu page.

    http://codex.wordpress.org/Appearance_Menus_SubPanel

    Hope this helps.

  5. KylieMemoirs
    Member
    Posted 2 years ago #

    Brilliant , that is exactly what I was looking for. thank you for your help

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.