WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] syntax error and trying to add links to my header (4 posts)

  1. EdubMusic
    Member
    Posted 3 years ago #

    I made a mistake in the code trying to paste some links into the header of my wordpress blog. I am simply using the WordPress '2010 Theme' and am trying to add links to my social media sites as you'll see. This line of code got messed up (a space or punctuation is missing):

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary') ; ?>

    Something in there is wrong and my page does not load anymore. I tried to paste these lines of code directly after that:

    <ul class="icons">

  2. <img src="http://www.afrikast.com/vft/images/myspace.png"/>
  3. <img src="http://www.afrikast.com/vft/images/facebook.png"/>
  4. <img src="http://www.afrikast.com/vft/images/youtube.png"/>
  5. When I placed the above code directly above the </div><!-- #access --> line, the links were separated on different lines. If anyone can help fix this so my website can be displayed properly it would help. But I originally copied the code from http://www.vieuxfarkatoure.com/. How did this page align those icons on the right? Thank you for any help; I am code illiterate, and it would be easiest if I could just copy and paste to fix this. If there's a lesson here I am eager to learn. My page is normally at http://www.eddiewestmusic.com.

  • vtxyzzy
    Member
    Posted 3 years ago #

    You are missing one closing parenthesis. Change this:

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary') ; ?>

    to this:

    <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary')) ; ?>

  • EdubMusic
    Member
    Posted 3 years ago #

    Thanks @vtxyzzy. That was so intuitive, but I didn't see it. I am back online with the site and am still trying to get the icons in one row on the right. I got them aligned right, but want them on the same line. Here's my code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    So they are displayed on my site but stacked somewhat strangely. The Vieux Farka Toure site looks pretty nice the way he has it. Any suggestions? I'm hunting the web.

  • vtxyzzy
    Member
    Posted 3 years ago #

    Here is how his nav area is structured:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    ul.icons has the css float: right;.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags