• Resolved generositymedia

    (@generositymedia)


    I’m having a really strange problem with the WordPress site I’m working on. Please see the rough version here:

    https://www.thedailymass.com/fsu/tradition/

    The menu items in the left sidebar (such as “THE BIBLE”, “TRADITION”, “OTHER”, “HISTORY”) are conflicting with the functionality of links in the main content area to the right. On this page, the thumbnail images (when clicked) should open a Shadowbox window with an embedded Vimeo player.

    Instead:
    When you mouse over the video thumbnails, the cursor changes (seemingly randomly) from a hand (link) to an arrow (non-link). This was driving me crazy at first, until I realized that the inactive “arrow areas” are those in horizontal alignment with the sidebar menu items. If you highlight the text “THE BIBLE”, “TRADITION”, “OTHER”, “HISTORY” in the sidebar menu, you’ll see that the highlight is not contained by the sidebar. It extends all the way to the right, overlapping the main content div. You should also note that the other items in the sidebar (“HOME”, “TOPICS”, or “JOIN US”) do not exhibit this issue. This is probably because they are static, while the menu items (“THE BIBLE”, “TRADITION”, “OTHER”, “HISTORY”) are generated dynamically with “<?php wp_nav_menu(array(‘menu’ => ‘Main Nav Menu’)); ?>”.

    What’s going on here? The entirety of the “sidebar.php” is wrapped in an “<aside>” tag which has a specific width. Is there some way to force the “Main Nav Menu” to conform to the div in which it is contained?

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    Start by sorting out the markup errors.

    Thread Starter generositymedia

    (@generositymedia)

    Alright. I think I found the issue.

    WordPress is generating this for the Nav Menu:

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

    I was able to get the Nav Menu under control by specifying a width for class “menu”. I’m surprised WP uses such a generic selector for this.

    esmi

    (@esmi)

    I’m surprised WP uses such a generic selector for this.

    What are you using to generate that menu? It doesn’t look like the output of any WP template tag that I’ve seen.

    Thread Starter generositymedia

    (@generositymedia)

    I have this in “sidebar.php”:
    <?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?>

    and this in “function.php”:

    if (function_exists('register_nav_menus')) {
        register_nav_menus(
        	array(
        		'main_nav' => 'Main Navigation Menu'
        	)
    
        );

    The menu “Main Navigation Menu” is set up in the WP backend under Appearance/Menus. I just created a new menu and added four pages to it.

    I’m relatively new to wordpress. Is there something funny or non-standard about the way this menu is implemented?

    esmi

    (@esmi)

    The markup in the top menu is not core WP. For example:

    <a href="../../../jumpstart-with-jane.php" id="jump" onmouseover="mopen('div1')" onmouseout="mclosetime()"><span>Jump Start With Jane</span></a>

    WP never uses relative urls or mouseover/mouseout. And there’s no generated menu classes. That menu is not generated by WP.

    The lower menu looks like a standard WP custom(?) menu – which means that you can change the classes via the parameters in wp_nav_menu

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sidebar Menu Overlaying Main Content in a Strange Way’ is closed to new replies.