Tagged: , ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #388126
    #388387

    Hi Michae1!

    Can you post the link to your website please?

    Regards,
    Yigit

    #388558

    Sorry, remembered the link on all the other posts but this one.

    http://revxa.wpengine.com/ (hosted on WPengine)

    Thoughts?

    #388969

    Hey!

    This customization is a bit complicated than it sounds but we might come up with an easy workaround. First, we need to see a screenshot of how you want the other pages’ header to look like.

    Regards,
    Ismael

    #388987

    Hi Ismael,

    INNER PAGES : I just want the menu to be in the same position and the smaller version of the logo. Same sticky menu, but no scaling affect.

    HOME PAGE : This would have the large logo, that scales down on scroll. But the menu text items would remain in the same place (not move up, like they do now), when scrolling.

    http://snag.gy/YmXMX.jpg

    #389193

    Hi Ismael,

    Sorry for the redundancy in posts.
    Could you share a solution now that I’ve clarified the end goal?

    Thanx!

    #389199

    Hey!

    Alright. First, you need to set the black logo as the default logo then disable header shrinking but keep the behavior fixed or sticky. After that, we’ll figure out the home page header. Remove this code to keep the menu container aligned:

    .av-main-nav li {
    top: -30px;
    }

    Add this to disable the shrinking on inner pages:

    add_action('wp_footer', 'avf_header_rev', 1);
    function avf_header_rev(){
    ?>
    <script>
    (function($){
        $(window).scroll(function() {
    		var home   = $('body').hasClass('home'),
    		 	header = $('.html_header_top.html_header_sticky #header');
    		if(!home) {
    			$(header).removeClass('av_header_shrinking');
    		}
        }).scroll();
    })(jQuery);
    </script>
    <?php
    }

    Regards,
    Ismael

    #389223

    Hi Ismael

    Coupla questions. First off, are there open tags in your code in the second to last line and the third line? Or am I reading that wrong?

    Do I need to create a child theme & function.php file? Or can I just put this in the main functions.php file for testing? I know it will be overwritten on Enfold updates, I just want to be able to quickly test what we’re doing.

    Whelp, yeah, putting it in the function.php file just broke everything (figured it would with the open tags). Restored to previous backup, so . . .

    What next?

    • This reply was modified 9 years, 3 months ago by Michae1.
    #389721

    Hey!

    The open and closing PHP tags are for easily displaying javascript instead of echoing it out. It shouldn’t be causing errors as long as you already have PHP tags in the file. To make it easy you can use our child theme, http://kriesi.at/documentation/enfold/downloads/, and then paste the code into the bottom of the functions.php file.

    Regards,
    Elliott

    #389946

    Hi!

    In addition, try to place the code first on pastebin.com then paste it again to your editor. Some editors automatically converts symbols to their html entity code.

    Cheers!
    Ismael

    #389987

    Two things :

    1) If I’m not using a child a theme, where would I paste the code?
    2) I don’t believe it’s a copy/paste issue, as the characters look exactly the same as your code example above.

    #390076

    Hi!

    1- Functions.php file of your parent theme ( Apperance > Editor )
    2- Single and double quotes should look the one in front of same_category text and not like the one after it – http://i.imgur.com/bs3wO40.png
    copy pasting the code sometimes changing them too. Please check if that is the case

    Best regards,
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.