• Resolved Ringtozo

    (@ringtozo)


    Hello,

    I’m using the widget-logic plugin to display related pages on the side-bar.
    For example if you’re on a page showing some work I did for some client, the sidebar shows you other works I did for the same client…
    On each page the side-bar changes in relation to the content.
    So far so good.

    For other matters I recently created a page called “home” that I use as the static home page of the site. Since that moment on, the “home” link shows now on the side-bar of every page. That is normal. It always worked that way so previously I had to exclude the pages IDs on the side-bars I didn’t want them to show up. But the home page has no ID… So I’m stocked!

    How can I remove that “home” link from my side bars?
    Thanks for your help.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Ringtozo

    (@ringtozo)

    Can’t seem to find a way yet…

    have you read:
    http://codex.wordpress.org/Conditional_Tags

    the “home” page could either be is_home() or is_front_page()

    differences might be explained in the above link.

    Thread Starter Ringtozo

    (@ringtozo)

    Thank you for answering.

    Yes I know about conditionnal tags (I mean since rescently as I am quite a newbie in these matters).

    I am already able to display my widgets on the pages I want it to appear and exclude it from the pages I don’t want it t appear.

    My problem is this:

    The widget I use is the “pages” widget. It links you to other pages.
    By default, any created page gets listed in the widget. So if I don’t want a new page to be listed, I just exclude the ID of that page.

    But The home page has no ID. So it’s the only page so far that is always showing up in the widget while it’s not relevant…

    It doesn’t seem like anyone had this problem before.

    my website is: http://www.asinomas.fr/wp

    the home page listed in the widget shows as “ASINOMAS – this is my portfolio” as that is the static home page I’m using.

    i ran a little trial locally in my test site, and it seems to work if you use the page id of what is now your static front page; in your case that would be 407

    Thread Starter Ringtozo

    (@ringtozo)

    Yes! It worked, thank you very much! How did you find out my home page id?

    i use firefox web developer add-on; CSS – view style information;
    when hovering over your home page link, it shows all css id and classes.

    the page link has the page id integrated in one of the css classes.

    see
    http://codex.wordpress.org/Function_Reference/wp_list_pages#Markup_and_styling_of_page_items

    Thread Starter Ringtozo

    (@ringtozo)

    Great! Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Widget-logic home displaying everywhere’ is closed to new replies.