Widget Logic
Disappearing Sidebars with Widget logic activated! (4 posts)

  1. aidanodr
    Posted 4 years ago #

    Hi Guys,

    This could be a normal thing to happen, so just checking.

    I added Widget Logic to my WP CMS Site. I have two widgets and two widget area's. I want the widget in the left sidebar and the widget in the right sidebar to ONLY appear on the front static homepage called Home.

    I added "is_front_page()" and "is_page('Home')" to each widget. YIP, it did the job on the front page, however it made the SIDEBARS on all other pages literally disappear.

    Is this meant to happen? I thought this plugin was for hiding the widgets IN the sidebar and not hiding the sidebar itself?

    I thought at the initial install stage of this plug it seemed to work and leave the sidebars. Im making sure it is not me after scrubbing some code elsewhere to cause this by mistake!


  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Did you mean to add is_front_page() and is_home()?

  3. aidanodr
    Posted 4 years ago #

    Sorry, I tried both separately - first I tried is_front_page() then I tried is_page('Home'), I also tried is_home() but none worked. No I didnt use the ".

    What is the normal behavior - do the actual sidebars get hidden on other pages as well as the widgets OR is it just the widgets themselves are meant to be hidden?


  4. aidanodr
    Posted 4 years ago #

    DO NOT ask me why this is the case ..

    I retraced my steps. A few hours ago I had removed the CSS:

    margin-bottom: 20px;

    From the end of #sidebar1 and #sidebar2 to bring the footer clser horizontally.

    When I then added the Widget logic to each of the widgets on the front page it made the sidebars disappear on all other pages.

    I replaced the - margin-bottom: 20px; in the CSS for each sidebar, now all is fine. Widgets intact on home page, gone on all others BUT leaving the sidebars intact.

    Go figure!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic