Encore & menu question

Basic support is open to all members of Volatyl Themes but what about those who need a little more? That's what Volatyl Themes subscriptions are for. The Priority Support subscription gets you more detailed, personal support while the Advanced Development subscription not only includes Priority Support, but also grants you access to premium content only seen by subscribers. This premium content will help you take your Volatyl websites to the next level with advanced development techniques, integration tips, and more information on how to really put Volatyl to use. Check out the subscriptions!

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  sdavis2702 6 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3847

    Annie Anderson
    Participant

    Sean,

    So, I’m playing around with Encore and want to know what the best way to move the Standard Menu above the header.

    In Genesis, I’d just write a custom function for it and throw it in the functions.php file but it seems like that’s not how Volatyl is setup. What do you think? I noticed you use a similar menu on the new version of sdavismedia – that’s pretty much what I’m looking to do.

    Thanks! Appreciate the info.

    ~Annie

    #3850

    sdavis2702
    Keymaster
    Post count: 72

    Hey! It would be pretty much the same process here. The only reason there is no custom function necessary for turning off the menu in the header is because that functionality is already built into Volatyl. You would only need a function to relocate the menu. Here’s what you’d do:

    1. Turn the standard menu on in the Volatyl Content Options and then go build the menu in the Appearance => Menus menu. Assign the menu to the Standard Menu location like normal and save.
    2. Then go back choose not to display the Standard Menu in the Volatyl Content Options. It won’t be displayed in the normal location, but the menu data still exists and can be used elsewhere.
    3. Use a custom function in your functions.php file to display it somewhere else like so (this is for full-width HTML):

    // Relocate the Standard Menu
    function relocate_standard_menu() { ?>
        <div class="new-menu-area full">
            <div class="main">
                <div class="new-menu inner border-box clearfix">
                    <?php wp_nav_menu( array('theme_location' => 'standard' )); ?>
                </div>
            </div>
        </div>
    <?php }
    add_action('vol_before_html','relocate_standard_menu');
    

    That’ll take the Standard Menu and display it in the “vol_before_html” hook like I did on SDavis Media. You’ll still have the ability to display it in its normal spot if you chose to.

    Tell me, are you using the Header Menu at all?

    #3849

    Annie Anderson
    Participant

    AH! That’s the step I was missing then – turn it off.

    No, not using header menu.

    #3848

    sdavis2702
    Keymaster
    Post count: 72

    Sorry about the confusion!

    The reason why I ask if you’re using the header menu is because it’s the only actual default menu. It’s registered no matter what and always shows in your Menus panel. The Standard and Footer menus are both considered “extra” and Volatyl does not register and support those menu locations unless you turn them on in the Volatyl Content Settings.

    With that being said, if you are not using the Header Menu at all, it would actually be better to relocate it instead of using the Standard Menu. Reason being, it’s always going to be registered and “on” (it’s simply not displayed if you choose to hide it in the Volatyl Content Settings) no matter what. So if you use a function like the one in my first comment, replacing “standard” with “header”, you don’t have to do any trickery like #1 and #2 in my first comment.

    Does that make sense? That’s exactly what I did with SDavisMedia.com. So to put a menu at the very top of my site, I simply pasted this into my functions.php file:

    // Custom bar
    function custom_bar() { ?>
        <div class="top-bar-area full">
            <div class="main">
                <div class="top-bar inner border-box clearfix">
                    <?php 
                    wp_nav_menu( array('theme_location' => 'header' )); 
                    get_search_form( true );
                    ?>
                </div>
            </div>
        </div>
    <?php }
    add_action('vol_before_html','custom_bar');
    

    (that also includes my search form as you can see on the site… remove that line to omit)

    From there, as long as a menu is assigned to the Header Menu location, it’ll display wherever you put it. Likewise, you can just uncheck the Header Menu box in the Volatyl Content Settings (which you’ve already done anyway) and you’re good to go.

    In other words, there’s no need for you to use the Standard Menu for what you were trying to do.

    Let me know if this helps!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.