-
AuthorPosts
-
January 30, 2015 at 8:03 am #388126
I’m using the sticky nav (transparency) option for my Menu, with the logo set to scale. But I’d like a LARGE version of the Logo on the main page (that scales when scrolling) and a SMALL version on all the other pages (that doesn’t scale, but still remains sticky when scrolling).
January 30, 2015 at 6:01 pm #388387January 30, 2015 at 10:28 pm #388558Sorry, remembered the link on all the other posts but this one.
http://revxa.wpengine.com/ (hosted on WPengine)
Thoughts?
February 1, 2015 at 9:18 am #388969Hey!
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,
IsmaelFebruary 1, 2015 at 10:24 am #388987Hi 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.
February 2, 2015 at 9:05 am #389193Hi Ismael,
Sorry for the redundancy in posts.
Could you share a solution now that I’ve clarified the end goal?Thanx!
February 2, 2015 at 9:27 am #389199Hey!
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,
IsmaelFebruary 2, 2015 at 10:13 am #389223Hi 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, 10 months ago by Michae1.
February 2, 2015 at 10:53 pm #389721Hey!
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,
ElliottFebruary 3, 2015 at 10:42 am #389946Hi!
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!
IsmaelFebruary 3, 2015 at 11:37 am #389987Two 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.February 3, 2015 at 2:23 pm #390076Hi!
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 caseBest regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.