ThemeAwesome / WP-Forge

WP-Forge - A Foundation for Sites WordPress Theme
https://themeawesome.com/wp-forge-wordpress-foundation-for-sites-theme/
85 stars 28 forks source link

Display logo in sticky menu #24

Closed JamesAM closed 9 years ago

JamesAM commented 9 years ago

For a new site I'm building, I'd like to display the logo in the sticky menu, once that menu has stuck to the top.

I've had a look in content-nav.php and attempted to modify part of it by copying the logo call to it, but that ended up displaying two logos in the header when the sticky menu was not stuck.

What would be the best way to include the logo in that menu? Thanks.

tsquez commented 9 years ago

Hi James, That's a really good question. If at all possible, could you send me the logo in question and possibly a mock up of what you are trying to accomplish and maybe I can figure something out for you.

I believe you are in the right area with content-nav.php, its just a matter of maybe doing a "if" statement or something along those lines

You can attach them here or you can send to my email tsquez[at]gmail[dot]com

JamesAM commented 9 years ago

Hi Thomas,

Something like this... May be the logo will be a bit smaller.

logo in sticky hcc logo

tsquez commented 9 years ago

OK so now that I have those two components, what exactly is the main position of the nav going to be set to? Top of Browser - Fixed?

and do you have a screenshot of what you did before:

I've had a look in content-nav.php and attempted to modify part of it by copying the logo call to it, but that ended up displaying two logos in the header when the sticky menu was not stuck.

can you attach that content-nav.php file and screenshot of what it looked like as well. This is so I can follow along with what you are trying to do and so I have better understanding. Sorry should have asked for this previously.

JamesAM commented 9 years ago

The nav position is contain to grid sticky.

With the modified content-nav.php as follows, this is where I am in the normal position, then in the stuck position: normal stuck

    <?php if( get_theme_mod( 'wpforge_nav_position' ) == 'sticky') { ?>

        <?php if( get_theme_mod( 'wpforge_mobile_display' ) == 'yes') { ?>
        <div class="nav_wrap row hide-for-small-only">
        <?php } else { ?>
        <div class="nav_wrap row">
        <?php } // end if ?>
                <div class="contain-to-grid sticky">

                                <?php if( get_theme_mod( 'wpforge_logo' ) ) { ?>
                <div class="header-logo">
                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
                        <img src="<?php echo get_theme_mod('wpforge_logo'); ?>" alt="<?php echo esc_attr( get_bloginfo('name', 'display') ); ?>">
                    </a>
                </div><!-- /.header-logo -->
            <?php } // end if ?>

                               <nav class="top-bar" data-topbar data-options="mobile_show_parent_link: true">
tsquez commented 9 years ago

OK this isn't working for me, can you possibly send me the actual theme you are working on?

tsquez commented 9 years ago

Any word on sending me that theme so I can check it out and see what I can do?

tsquez commented 9 years ago

well I don't know what to tell you. I installed the theme you sent over and I cannot get it to work like the screenshot you have above. This is what I have:

screeny

This is a local test environment, using WAMP. I added the header logo and for some reason it doesn't want to appear even though the header logo code is correct. So I don't know whats going on.

tsquez commented 9 years ago

Since we have moved this over to email, I am going to close this amigo.