- This topic has 13 replies, 2 voices, and was last updated 9 years, 4 months ago by Tom.
-
AuthorPosts
-
May 25, 2015 at 6:06 pm #110250Jan Sacdalan
Hi Tom,
I’m using a plugin called “mystickymenu” and I can’t figure it out how to put my logo on the sticky menu. Can you help me out on this? here’s my site http://janwithaina.com
By the way, I’m loving your theme!
Thanks in advance!
May 25, 2015 at 11:17 pm #110294TomLead DeveloperLead DeveloperTough one! The plugin is wrapping the sticky nav below where the logo is showing up, so it’s leaving the logo behind.
I’ll have to play with this a bit in the morning – I’ll get back to you with a solution ASAP! π
May 25, 2015 at 11:33 pm #110300Jan SacdalanThanks Tom! I’ll wait for your reply soon π Your $30 add ons are super worth it!
May 27, 2015 at 12:41 am #110517TomLead DeveloperLead DeveloperSorry for not getting back to you sooner – this is a tough one because of where the plugins adds the sticky HTML into the document.
I think our only option is to add some JS to move the site logo into the plugins HTML structure on scroll.
You can add this using GP Hooks in the wp_footer hook:
<script> jQuery(window).scroll(function() { if( this.offset.top >= 320 && this.width() >= 800 ) { jQuery(".site-logo").prependTo("#mysticky-wrap"); } else { jQuery(".site-logo").prependTo(".inside-navigation"); } }); </script>
Give it a shot – it might need some tweaking π
May 27, 2015 at 12:52 am #110519Jan SacdalanNo Worries!
Anyways, the JS is not working. I paste the JS in to my wp_footer hook, clear the cache, but nothing happen. This is really a tough one..
May 27, 2015 at 8:37 am #110610TomLead DeveloperLead DeveloperDid you remove the code after adding it? I’m not seeing it in your source.
Let me know π
May 27, 2015 at 10:48 am #110639Jan Sacdalansoory my bad π you can check it again. Also, the JS made my fixed widget delayed when I scroll the page down..
May 27, 2015 at 11:01 am #110640TomLead DeveloperLead DeveloperTry this instead.
I’m working on my own sticky nav/header script, so this should only be temporary π
<script> jQuery(window).scroll(function() { if( jQuery(window).offset.top >= 320 && jQuery(window).width() >= 800 ) { jQuery(".site-logo").prependTo("#mysticky-wrap"); } else { jQuery(".site-logo").prependTo(".inside-navigation"); } }); </script>
May 27, 2015 at 11:04 am #110641Jan Sacdalanstill no logo π but the fixed widget is back to normal. π
May 27, 2015 at 2:19 pm #110743TomLead DeveloperLead DeveloperHmm, maybe we’re getting too fancy..
While configuring the plugin, what happens if you set the “Sticky class” to “.main-navigation”?
May 27, 2015 at 7:21 pm #110792Jan Sacdalanafter I put .main-nav to “sticky class”, the menu choices are not align in the sticky navigation. So I made my sticky background color to clear and then put this codes to “.myfixed css class” in the plugin’s settings
.myfixed { margin: 0 auto!important; float:none!important; border:0px!important; background:white!important; max-width: 100%!important; border-bottom: 5px solid #970000!important; box-shadow: 0 10px 5px -5px rgba(0, 0, 0, 0.5)!important; }
The menus are align but my logo is not in sticky nav.
May 28, 2015 at 12:00 am #110843TomLead DeveloperLead DeveloperWhat happens if you put “.main-navigation” as the sticky class? I tested this on my localhost and it seemed to work well?
Since your menu is contained, you may need to add this CSS:
#mysticky-nav { width: auto !important; left: 50% !important; margin-left: -550px; /* half of your container width */ }
May 28, 2015 at 12:12 am #110853Jan SacdalanOMG Tom! YOU ARE GENIUS! It WORKS! thank you for helping me out there. you are awesome!
May 28, 2015 at 12:13 am #110854TomLead DeveloperLead DeveloperAwesome! Glad we got it working π
-
AuthorPosts
- You must be logged in to reply to this topic.