WordPress.org

Ready to get started?Download WordPress

Forums

wp_footer() breaks menus? (3 posts)

  1. jnorion
    Member
    Posted 1 year ago #

    I'm having a very weird problem with a custom theme I'm still in the process of building. I have two standard nav menus in the theme (controlled by the Menu control panel), which has been working fine throughout development. I installed the Portfolio Slideshow plugin and discovered that I had neglected to call wp_footer(), so I added that into my footer.php file. As soon as I did that, the menu links stopped working.

    WordPress is installed in a subdirectory of my domain, so the correct page path looks like this: http://domain.com/client/clientname/current-page As long as wp_footer is disabled, links in the menus work fine.

    With wp_footer enabled, clicking a link changes the url in the title bar to http://domain.com/client/clientname/current-page/#/client/clientname/linked-page and the page doesn't change. If I click a different link, the "linked-page" part will change to reflect this new link but nothing happens. However, if I click a link in the body of the page it works normally.

    I tried disabling the Portfolio Slideshow plugin but leaving wp_footer enabled, but that didn't solve the problem.

    Can anyone point me in the proper direction?

  2. Can you provide a link to your site and maybe paste your footer.php code in pastebin so we can see what it looks like?

  3. jnorion
    Member
    Posted 1 year ago #

    Unfortunately I can't link to the site, due to client confidentiality. But here's my footer.php code... it's just all the closing tags for the site structure, and then the call to wp_footer.

    <?php
            // Define global path variables
            global $templateFolder;
    ?>
    
                                    <hr class="clear" />
                            </div><!-- #mainContent -->
                            <div id="footer">
    
                            </div><!-- #footer -->
                    </div><!-- #wrapper -->
                    <div id="shadowBottom"></div>
                    <?php wp_footer(); ?>
            </body>
    </html>

Topic Closed

This topic has been closed to new replies.

About this Topic