Highlighting current page

Forums Forums Menus Highlighting current page

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #84
    Anonymous
    Member

    Thanks for the great plugin. Is there any way to mod it to highlight the current page displayed?

    #2361

    It may be possible, but I haven’t bothered trying as yet. This isn’t a typical feature for a dropdown menu though, as often the item highlighted will be buried deep within the menu structure anyway.

    #2362

    LOL, yes it is very exciting when you start discovering these things. I do recall finding that current_page_item ID though and although it does work, there are a couple of problems with using it in this plugin.

    It only applies to categories and pages, it wont work with archives or the home page. The home page can be coded manually, but I have no idea how to do the archives unfortunately.

    The parent page ID won’t work if your dropdowns are held inside their own dropdown. Ie: like on the demo page.

    #2363

    Pointing out the page parent ID to me has got me thinking of ways I could get that working now. It would only require a little more PHP to get that to work, I’ll put that on my todo list.

    #2364
    nv1962
    Member

    Hi Ryan – first of all, my compliments for your incredible work on this plugin. I’m not sure people sufficiently realize how incredibly complex the work is you’ve put into making it a very comprehensive and flexible solution for navigation management. I’m amazed and impressed.

    Now, on point here: what (if any) has changed since the OP here posted the question on highlighting the current page’s parent (i.e., the parent in case a lower element of drop-downs is the selected / active page)? I see that on the demo page, it clearly works – as it’s shown there. Unfortunately I can’t replicate that in my (as of yet) vanilla install.

    Thanks in advance!

    (PS I chose to post this here on an existing topic, to avoid clutter, as it’s essentially the same issue – I think)

    #2365
    nv1962
    Member

    Doh – forgot to include a link to <a href="http://www.nitaonline.org/">the site I’m working on</a>. Sorry…

    #2366

    Hi,
    Highlighting of the current page is possible with the premium CSS generator … https://geek.hellyer.kiwi/premium_support/

    Good to see you have the beta plugin up and working nicely. If you find any problems or have any suggestions for changes/improvements then let me know ASAP as I’ll be wrapping up development of it shortly and preparing it for official release.

    #2367
    nv1962
    Member

    …and total awesomeness ensued. Yep, as I now happily found out: with the Premium subscription the "Optimize" extras become active, and THAT is what the "parent" highlighting thing is about. I hope you don’t mind that I fiddled something with the images to blend in better with the site?

    One oddity I detected is that in FF the text items of the sub-menus are left-aligned (as I think they should) but viewed in IE (7 and 6) they’re, curiously, centered.

    Oh – here’s another: in WP one can select a static page to be the front page (and another to have the Posts – i.e. what I have set up as the "News" item). Now here’s the quirk: I’ve set an "About Us" page as the "Home" page, and also included the About Us page in the menu (I’m rethinking that now, BTW) but even after selecting Home, it won’t stay highlighted as the "active" page. So far, just quirky. Now the weird part: if I select the "News" page (i.e. with the current, most recent posts) both it (News) *AND* the Home item are highlighted. Perhaps something to do with the code assuming that "Latest Posts" is the default Home page, ignoring something else (a Page) set as the Home page? It’s nothing of a deal-breaker at all – but it’s surely a head-scratcher.

    Oh well.

    Thank you again Ryan – this is insanely useful, and for a non-coder like me (I’m a volunteer site assembler / admin for a few non-profits) it’s very little short of a G*dsend.

    PS: in the CSS generator: text "Optomize" > "Optimize" (the WP setting) oh, and in the demo blog, why not use the Slimbox2 there to show it off, too? ;-)

    #2368

    [quote:38bx3j7v]Thank you again Ryan – this is insanely useful, and for a non-coder like me (I’m a volunteer site assembler / admin for a few non-profits) it’s very little short of a G*dsend.[/quote:38bx3j7v]

    Glad to hear you found it useful <img decoding=” title=”Smiley” />

    [quote:38bx3j7v]…and total awesomeness ensued.[/quote:38bx3j7v]

    Lol.

    [quote:38bx3j7v]I hope you don’t mind that I fiddled something with the images to blend in better with the site?[/quote:38bx3j7v]

    Of course not.

    [/quote]One oddity I detected is that in FF the text items of the sub-menus are left-aligned (as I think they should) but viewed in IE (7 and 6) they’re, curiously, centered.[/quote]

    Sounds like something in your theme messing up the CSS. I’ll take a look and be back shortly.

    [/quote]Now here’s the quirk: I’ve set an "About Us" page as the "Home" page[/quote]

    Hmmm, the plugin probably won’t treat it as the home page. It just treats the root of your WP install as the home. Or at least I think that’s how it does it (I can’t remember to be honest).

    [/quote]Now the weird part: if I select the "News" page (i.e. with the current, most recent posts) both it (News) *AND* the Home item are highlighted.[/quote]

    Ah, thanks. That is definitely going on my ‘bug to be fixed shortly’ list.

    [quote:38bx3j7v]Perhaps something to do with the code assuming that "Latest Posts" is the default Home page, ignoring something else (a Page) set as the Home page?[/quote:38bx3j7v]

    The plugin works out the home page by itself, and then WP does the same. However the plugin gets it wrong <img decoding=” title=”Tongue” /> That can’t be too hard to fix though and I’ll see what I can do.

    [quote:38bx3j7v]PS: in the CSS generator: text "Optomize" > "Optimize" (the WP setting) oh, and in the demo blog, why not use the Slimbox2 there to show it off, too? ;-)[/quote:38bx3j7v]

    I intend to discard that demo site soon. I’ll be converting the main site to be used for demonstration purposes instead. An extra chunk will just need to be added to activate various features, such as https://geek.hellyer.kiwi/?generator=on currently triggers the generator. And https://geek.hellyer.kiwi/?display=mln will activate the Multi-level navigation plugin and https://geek.hellyer.kiwi/?display=slimbox2 will hopefully activate the SlimBox2 plugin (if Malcalevak sets up his plugin to allow it).

    The bonus of doing it this way is that I only need to maintain one site, and it keeps everyone surfing through the main site instead of reading a bunch of junk and makes sure all links are pointing to useful pages (useful for SEO purposes).

    #2369

    nv1962 – You seem to have three wphead() function calls in your theme. This will probably be causing a lot of problems on your site, particularly with javascript.

    Perhaps try correcting that and see if it helps.

    #2370
    nv1962
    Member

    Hrm… I have no idea how you found <em>that</em> one out but… You’re right: one is in the header file of the theme (in header.php – seems legit there) and two mentions in one and the same plugin file (specifically, the all-in-one-seo-pack.php – one of them is commented out though). Other than those, I can’t find any other instance of calls to wp_head() (and thank goodness for Notepad++ and its fast multi-file search function…) Now, I could disable the all-in-one-SEO plugin, but I also use it to put in the validation info, in meta tags, for several APIs (e.g. Google) so I’m reluctant to do so. However, I tried that (and of course disabled the cache, just in case) but no dice: the quirky things remain (i.e. no "Home" selected highlight, but instead the static Page setup as the front page, and the "double highlight" when the Latest Posts page, "News" in my case, is selected).

    Once more, your fast and on-point helpful response is amazing. However, I’m a bit apprehensive to continue this here as I’m guilty of topic drift… The "highlighting parent" issue has been solved after all. Please let me know if I should post to another topic instead!

    #2371

    Don’t worry about topic drift. I can always split this off if I feel like it anyway.

    [quote:2iw6w4oi]thank goodness for Notepad++ and its fast multi-file search function[/quote:2iw6w4oi]

    I didn’t realise it could do that … I’m downloading it now <img decoding=” title=”Smiley” />

    I don’t have a convenient way to check your site right now in IE to see what the problem is. I’ll try to remember to check it at home tonight. If I don’t post back within the next 12 hours then bug me about it as I probably forgot.

    #2372
    nv1962
    Member

    I think the triple wp_head() call is now resolved – I forgot to take out a call to dropdown.js that’s part of the standard theme. Both the call and the JS file (just in case) have now been taken out, but it still doesn’t resolve the "double highlight" thingie. Weird.

    #2373

    I’ll have the double highlight thing sorted within a week or so probably. I desperately want to get the new beta uploaded as the stable version as it integrates perfectly with the template generator. Once that is up and running as the new stable version I’ll release a new beta with a fix this problem plus a few other quibbles various people are having.

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