Support » Plugin: Widget Logic » Widget in homepage only (with static homepage)

  • Resolved eyephone21


    Great code, i love it.
    I wanted a widget to appear in homepage only but ihad an issue with is_home(), i don’t know if it’s because i have a static page as homepage.

    After some tries (i’m not that code jedi) i found that using the id of the page worked, in my case i used is_page('77')

Viewing 7 replies - 1 through 7 (of 7 total)
  • maybe somebody find this useful!

    where do I find my page number?

    got it figured out…

    To discover the number of the page (or post) in the dashboard’s “pages” page all you have to do is hover the title of the desidered page and you’ll see the number in the status bar, usually at the bottom of the browser, something like ” …/wp-admin/post.php?post=520&action=edit”
    In this case 520 is the number you need.

    yep that’s how I got it, thanks… would you know how to have the widget only show on one page. I figured out one page but I have several more I don’t want it on.

    Sorry Charmer, english is not my language, so i didn’t get you last post.
    The code is_page('77') means to show a widget in that page only.
    To avoid other widgets on a page you have to use the ! that reverse the logic, so, in this case you’ll have to put !is_page('77')on all the widget that you want to hide on page 77 (but to display them on all others).

    I got it figured out… thanks, it worked a different way.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Widget in homepage only (with static homepage)’ is closed to new replies.