• Resolved stevejuba

    (@stevejuba)


    Does anyone know how to have certain widgets appear only on pages you want them to as opposed to every single page?

    Thanks,

    Steve

Viewing 13 replies - 1 through 13 (of 13 total)
  • Jonas Grumby

    (@ss_minnow)

    widget logic plugin

    Thread Starter stevejuba

    (@stevejuba)

    Great thank you–Do you know how to simply insert a conditional tag so you can have a widget appear in all pages EXCEPT said page as opposed to havin got list every single page which could take quite a while…??

    Thanks again for your help!

    esmi

    (@esmi)

    if ( is_page('Foo') ) dynamic_sidebar( 'bar' );?>

    Thread Starter stevejuba

    (@stevejuba)

    Awesome thank you— what does ‘bar’ equal–the official name of the wiget?

    i assume ‘foo’ should be replaced with the page that i dont want the bar to appear in?

    also–do I include ;?> within the tag

    esmi

    (@esmi)

    ‘bar’ = the id of the widget
    ‘Foo’ = the page name

    And yes – you need the ?> tag.

    Thread Starter stevejuba

    (@stevejuba)

    How do I find the id of the widget?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    If you use the widget logic plugin then you can do !is_page(pagename);

    The ! means ‘NOT’ you see.

    Thread Starter stevejuba

    (@stevejuba)

    thanks.

    so I typed in !is_page(forum);

    and instead of erasing it from that page I get: Parse error: syntax error, unexpected ‘;’ in /home7/photofly/public_html/photoflymembers/wp-content/plugins/widget-logic/widget_logic.php(161) : eval()’d code on line 1

    Any ideas?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Ugh, sorry, take out the ; at the end 🙂 My bad, I was thinking code and not logic.

    My Bad.

    Thread Starter stevejuba

    (@stevejuba)

    awesome!!! thank you

    what do I type now if I want to have it removed on other pages as well?

    thanks again

    Thread Starter stevejuba

    (@stevejuba)

    ONE more question!

    Now that the widgets are gone there is this extra space in the side bar where they used to be….any idea how to get rid of that and move it over

    my guess is its in one of the CSS style sheets somewhere and I would need to edit it out for that specific page??

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    what do I type now if I want to have it removed on other pages as well?

    If you want it off ALL pages, use !is_page()

    If you want it off selected pages, it’s !is_page( array('page1','page2','page3') )

    Now that the widgets are gone there is this extra space in the side bar where they used to be….any idea how to get rid of that and move it over

    Again, depends on how you want the sidebars gone. If it’s ALL pages, you can make a page.php templte file for all pages and omit the sidebar. If it’s SPECIFIC pages, you can do similar with page templates.

    See http://codex.ww.wp.xz.cn/Pages#Page_Templates

    Thread Starter stevejuba

    (@stevejuba)

    awesome—thanks a lot!

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

The topic ‘Selective widget displaying’ is closed to new replies.