Home page and blog page BOTH marked active when a static page is set as homepage

Forums Forums Menus Home page and blog page BOTH marked active when a static page is set as homepage

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1049
    nv1962
    Member

    Hi,

    I suppose this is an oldie, but I’m still trying to figure out why it happens, and what (if anything at all) I could do to address / avoid this.

    Here’s the issue:

    If you have marked a static page as your frontpage (Settings > Reading) and regardless of whether you also have set some other page as your posts page, in the menu both the homepage link AND the blogpage link are shown as "active" (highlighted) when you visit the page set as the blogpage (posts page). Anywhere else, the menu correctly shows the top-level parent of the page you’re visiting as the active (highlighted) one.

    It drives me nuts: I have tried all sorts of subterfuge – including the use of "phony" pages that actually redirect to the "real" homepage or blogpage (using e.g. the <a href="http://txfx.net/wordpress-plugins/page-links-to/">Page Links To</a> plugin) – no dice, visiting the blogpage causes both the homepage and blogpage links in the menu to be highlighted.

    Now, I’ve seen a few themes with built-in i.e. custom menus (elsewhere) whose authors make a point of indicating that they’re "specially designed" to deal with WP installs with a non-post page set as the frontpage, but I fail to understand what makes those work, or what it is that they have done.

    So, um… Am I just the only one with this weird issue? Have I overlooked some more or less obvious thing that I actually should have addressed in the theme? Or is it something in the menu code (PHP or CSS) that I need to tweak?

    To get an idea of what I mean, you can see the double menu highlighting issue <a href="http://www.nitaonline.org/news/latest/">on this page here</a> (that page is marked as the blogpage or Posts Page in Settings > Reading) and compare the menu appearance on that one to the non-highlighted menu (at all) on the <a href="http://www.nitaonline.org/">homepage</a&gt; of the same site. Note: I have also tried to include (in Settings > PixoPoint Menu > Home) a link to the "real" page which I set as the homepage, but that doesn’t make any difference.

    Hopefully I’m just a dunce as usual, overlooking one nifty option or another, because it just baffles me!

    #7125

    Hmmm, this will be related to how the is_front_page and is_home functions are used in the plugin. This should be fixable – I’ll put on my ever growing list of stuff to do.

    I’m working furiously at the moment, updating the plugin and essentially rewriting most of it from scratch so when I get to that section of the plugin I’ll see if I can fix that problem for you.

    Back when that code was written for the plugin there was no is_front_page() function in WordPress so there would have been no real way for me to add this functionality into the plugin without a lot convoluted code. It should be a lot easier now though.

    #7126

    FYI, is_home() does not detect the presence of the home page, hence the confusion.

    #7127
    nv1962
    Member

    <blockquote>I’m working furiously at the moment, updating the plugin and essentially <b>rewriting most of it from scratch</b></blockquote>
    Yikes! That’s a gargantuan task.

    The "double highlight" issue is a bit odd, but in no way approximating a show-stopper. I posted the inquiry here merely to see if it’s something I could "easily" fix – but from what you’re explaining, it’s just the way the WP core functions and hooks have been.

    Good luck with that enormous project. I’ll be eagerly awaiting your news!

    Oh – please let me know if/when you need the localization updated again; I’ve ditched my Spanish-language blog, so I’m not tracking localization directly as I used to. I have a staging server with Spanish WP lingering, so I can get to it whenever you need or like, just drop me a line.

    And, as always: thanks so much for keeping your awesome PixoPoint Menu plugin up-to-date, it’s quite impressive as it is.

    #7128

    Yep, it is a gigantuan task. However it’s something which has slowly evolved over time and there was simply too much legacy code lingering around. I also realised after releasing the PixoPoint Menu plugin that I should have done the editing panel in an entirely different way. It’s too buggy, too prone to errors and takes way too long to load. The new system will be lightening quick in comparison, ie: when you click submit it should redesign the menu a split second after you click it, with no need to wait for the page to reload.

    It will also run somewhat quicker. There is some odd-ball servers out there which for whatever reason have extraordinary trouble loading the javascript and CSS files in the plugin, like up to 10 – 15 seconds which is insanely long for a file of only a few kilobytes (most servers load in a matter of milli-seconds, it’s just the occasional odd-ball which doesn’t), so I’ll be reengineering it to fix those problems too.

    The new system will also put a lot less strain on my own server as if the existing plugin became super popular it would start causing problems for my hosting setup. The new system will be much less resource intensive for me (this doesn’t affect end-users though).

    I’d definitely appreciate a Spanish translation of the PixoPoint Menu plugin (I don’t have one yet, just the Multi-level navigation plugin). But best to wait till the new version is released as there’s bound to be plenty of changes beforehand.

    I’ll also be writing an upgrader so that users can more easily migrate from Multi-level navigation over to the PixoPoint menu plugin and the mulit-level-navigation plugin will be placed aside and I’ll be recommend users upgrade to the new plugin … once I confirm that everything is working properly and it’s been thoroughly tested on a variety of different sites.

    #7129
    nv1962
    Member
    &quot;Ryan&quot; wrote:
    FYI, is_home() does not detect the presence of the home page, hence the confusion.

    Bingo! You’re right – I just now (yeah… groan) figured out that when one has a blog set up with a static homepage (i.e. my case) the call to make is not is_home() but is_front_page() instead.

    So… um… you think you could point me to the location within your plugin to modify the conditional look, so as to do a dual check for e.g. !is_home() && !is_front_page() to get rid of that?

    #7130

    I’ll fix it for you and upload a new version.

    I’ll try to get it done within the next day or so. If I don’t, feel free to bug me about it as it’s clearly an annoying feature which I need to correct.

    #7131
    nv1962
    Member

    *cough*

    <img src="http://www.nitaonline.org/media/nita-santa-hat-120sq.png&quot; />

    Happy Holidays! <img decoding=” title=”Wink” />

    #7132

    Thanks for the cough! Working on this right now for you.

    #7133

    New version is attached.

    I haven’t been able to upload it to the official repository right now as I’m sending this via a public library which doesn’t seem to allow me to use Tortoise SVN (program I use to update the repository).

    #7134
    nv1962
    Member

    YAY!!!

    Thank you <em>so</em> much for solving that one… Much better! All happy now.

    And um, working that miracle from a public library? Makes it even <em>more</em> totally awesome.

    Thanks again!

    #7135

    I was in transit from Hobart to Wellington via Christchurch. I’m now working out of the public library in Wellington <img decoding=” title=”Smiley” /> I find libraries much more pleasant to work in than cafe’s <img decoding=” title=”Smiley” />

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