• First off, I love the theme- it looks great.

    I was wondering, however, how it would be possible for me to add something on the same line as the main nav menu, but float it to the right.

    For example, my nav menu does not have many items, so there is lots of room. I would like to add text or possibly a facebook like button on the same line as the nav menu, but float it to the right.

    I don’t mind editing some files- just when I do it, everything gets pushed underneath the menu instead of to the right of it.

    Any assistance is much apreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Its best to start by creating a child theme so your customisation is not lost on updating.

    Then you can hook into the menu and insert some additional markup with something like this in your child theme’s functions.php:.

    <?php
    add_filter('wp_nav_menu_items','add_twitter_icon', 10, 2);
    function add_twitter_icon( $items, $args ) {
      if( $args->theme_location == 'primary')  {
        $items .= '
    <div class="social-icons" style="float:right; padding-top:4px">
    <a href="https://twitter.com/Solar_Active">
    <i class="icon-twitter">
    </i>
    </a>
    </div>';
      }
      return $items;
    }

    Same issue but newbie at child theme stuff. I want to add text links only. How would I create a child and what code does the child need. I’m using the latest version.

    I want, for example,

    Contact Admin. | Links. | Text |

    For how to make a child theme, see:
    https://codex.www.ads-software.com/Child_Themes

    Thanks. What is the code I need to put in the file I’ll have to create?

    The code will be something like this:

    <?php
    add_filter('wp_nav_menu_items','add_links', 10, 2);
    function add_links( $items, $args ) {
      if( $args->theme_location == 'primary') {
        $items .= '
    <div class="add_links" style="float:right; padding-top:4px">
    <a href="https://...etc.../ ">Contact Admin</a>
     | <a href="https://...etc.../ ">Links</a>
     | <a href="https://...etc.../ ">Text</a>
    </div>'
      }
      return $items;
    }

    I’m sorry but its just a framework and I can’t debug it via the forum. The code goes in functions.php for the child theme.

    Thank you. I’m working on that site now. Will post once I finish.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding something on the same line as the nav menu’ is closed to new replies.