WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Problem Adding Custom Menu Function to Artisteer Template (2 posts)

  1. SheaUnrefined
    Member
    Posted 3 years ago #

    Since I'm using an Artisteer template, I had to manually add in the functionality for the custom menu feature.

    As instructed by an article recommended by WordPress, I made small changes to my functions.php and header.php files. Once the changes were made, everything seems to work fine, except it's shifted my sidebar (on the left of my site) and post body a few pixels to the left. It's not a function issue - everything works fine - but an aesthetics issue, and I can't figure out how to fix it.

    I have traced the problem to the changes made to the header.php code:

    I changed this:

    <div class="art-nav">
    	<div class="l"></div>
    	<div class="r"></div>
    	<ul class="art-menu">
    		<?php art_menu_items(); ?>
    	</ul>
    </div>

    to this:

    <div class="art-nav">
    			<?php wp_nav_menu(array(
            'sort_column' => 'menu_order',
            'menu_class' => 'art-menu',
            'title_li' => '<div class="l"></div><div class="r"></div>',
            'menu' => 'primary menu',
            'link_before' => '<span class="l"></span><span class="r"></span><span class="t">',
            'link_after' => '</span>'
          ) ); ?>
          <div class="l"></div>
    	<div class="r"></div>
    </div>
    	</ul>
    </div>

    Why would this shift everything appx 5 px over the left border of my sheet?

  2. SheaUnrefined
    Member
    Posted 3 years ago #

    So... yeah, I fixed it!

    <div class="art-nav">
    	<div class="l"></div>
    	<div class="r"></div>
    
    <?php wp_nav_menu(array(
            'sort_column' => 'menu_order',
            'menu_class' => 'art-menu',
            'title_li' => '<div class="l"></div><div class="r"></div>',
            'menu' => 'primary menu',
            'link_before' => '<span class="l"></span><span class="r"></span><span class="t">',
            'link_after' => '</span>'
          ) ); ?>
    
    <ul class="art-menu">
    </ul>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic