I think that for Twenty Eleven you should enter “.main-navigation” without of quotes.
Thread Starter
1200ug
(@1200ug)
I’ve changed that but nothing seems to happen. I cant find ‘.main-navigation’ anywhere in the source of the blog mind, are you sure thats the class?
If you are using Twenty Twelve than ‘.main-navigation’ is the class, i’m sure (I tested it on my own test site).
can you send me your blog url?
Ups, I’m sorry for Twenty Eleven theme you should use “#access” without of quotes
Thread Starter
1200ug
(@1200ug)
Oh, I thought I was going crazy there for a minute!
I’ve just set 'mysticky_class_selector' => '#access', but that still doesn’t work. Is it just the one value in mystickymenu/mystickymenu.php that I need to change? No other variables in other files? I had a look but couldn’t see reference to any
You should enter #access to Sticky Class field inside your admin area => Dashboard / Settings / myStickymenu. You shouldn’t change any file cause it will break the plugin on update.
Thread Starter
1200ug
(@1200ug)
Oh yes that now works, thanks a lot!
I was editing it by changing the source files, I wasn’t aware there was a settings file for it. My bad!
Thread Starter
1200ug
(@1200ug)
Is there any way to restrict the width to the width of the header, rather than it being full width?
Yes, just leave “Sticky Background Color” field blank (clear). Than if needed define custom background color for sticky header inside “.myfixed css class” field.
Thread Starter
1200ug
(@1200ug)
I’ve made the background transparent via the settings page and removing the background colour, but when I add .myfixed{background:#220e10;} to the style.css of my child theme nothing happens…
it’s because it’s already defined in plugin settings under “.myfixed css class” field (background:none!important;).
.myfixed { margin:0 auto!important; float:none!important; border:0px!important; background:none!important; max-width:100%!important; }
Thread Starter
1200ug
(@1200ug)
I must be editing the wrong thing here but I have gone into settings and modified the code you placed above to incorporate my background colour but that still does nothing :/
Ok, I think I solved your problem, just replace everything inside “.myfixed css class” field in plugin settings with this code:
.myfixed { float:none!important; max-width:100%;} .myfixed .menu { background-color:#220e10; float:left; } .myfixed div { margin: 0px!important; padding: 0px 7.6%; }
Thread Starter
1200ug
(@1200ug)
That didn’t seem to work, but no worries, I actually think the full width looks good 🙂
Is it possible to add any images or the search box to the bar? I would ideally like to add a small image to the left of the menu items and the search box to stay visible on the nav bar when scrolling?
hm, it works for me on a default twenty eleven, however 100% looks better to me to 😉
To add search bar to mystickymenu you should change sticky class to “#branding” and than add this css to .myfixed css class
.myfixed { margin:0 auto!important; float:none!important; border:0px!important; background:none!important; max-width:100%!important; } .myfixed a {display:none;} #mysticky-wrap {min-height:500px;} .myfixed #site-title, .myfixed #site-description{display:none;} .myfixed #access { margin: 0px auto 0px; } .myfixed #searchform { top: 0.3em!important; }
You can play around and on a similar way you can add logo too, everything that is inside #branding div can be visible in sticky menu. It’s just a bit of css knowledge and you should be good too go 😉