WordPress Login Screen With Menu Using Functions.php

I’ve finally managed to add the WP Menu to show within the WordPress Login / Register screen with a simple if wp-login.php / else show statement within the functions.php document. It works great apart from when trying to login it reloads the screen blank with just the style-less navigation bar.

I’m aware adding the navigation bar makes the code appear in the wrong standard order within the HTML but it seems to work neither the less, If anyone could advice me on this that would be great.

Read More

I have a funny suspicion its something to do with the code been within the functions.php but I can seem to get it on the login screen any other way without having to edit the core files.

URL: http://www.media21a.co.uk/development/unknown/wp-login.php

<?php if ( in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) { ?>
<div class="primary_navigation-wrapper" id="primary_navigation-wrapper">
        <div class="primary_navigation-content">
            <a href="<?php echo bloginfo('url'); ?>" class="alt-logo" title="<?php echo bloginfo('name'); ?>"><?php echo bloginfo('name'); ?></a>
                    <!-- Navigation Links -->
                    <?php if(function_exists('wp_nav_menu')){ ?>
                        <?php wp_nav_menu(array( 'sort_column' => 'menu_order', 'container_class' => 'navigation-bar', 'theme_location' => 'primary') ); ?>
                    <?php } else { ?>
                        <div class="menu"><ul><?php wp_list_pages('sort_column=menu_order&title_li='); ?></ul></div>
                    <?php } ?>
                    <!-- Navigation Links Finished-->
        </div>
    </div>  

    <div class="footer-wrapper" id="footer-wrapper">
    <div class="footer-content">
        <div class="left"></div>
        <div class="right">Theme Designed &amp; Created By <a href="http://www.facebook.com/people/Adam-Wadsworth/504069774">Adam Wadsworth</a></div>
    </div>
</div>
    <?php } else { ?>
<?php } ?>

Related posts

Leave a Reply

1 comment