WordPress.org

Ready to get started?Download WordPress

Forums

how do I remove widgets from my blog page only? (2 posts)

  1. greenhouse_guru
    Member
    Posted 4 years ago #

    I want to leave my widgets on all my static pages but not on my blog page. I want different widgets on my blog page(s).
    I have widget logic and I know I can add widgets using widget logic but I don't know how first to remove the ones that are there (the same ones that are on every other page).

    Is it possible to remove my standard widgets from my blog pages only.

  2. jimisaacs
    Member
    Posted 4 years ago #

    Using widget logic requires a little finagling to get what you want. It uses WordPress conditional statements.

    To remove widgets from a particular page, you must use the corresponding conditional. In this case the blog page is usually accompanied by the conditional statement of "is_home()". Therefore, to remove widgets from this page you must use a reverse conditional "!is_home()". The "!", in a sense, means that you actually mean the inverse of the statement, which all in all menas, "I want this widget to show up anywhere, except the where "is_home()" is "true" (the blog page).

    I know this can be somewhat complicated, let me know if I should try to be any clearer. I actually have my own widget plugin that may help, but without seeming like a shameless plug, I won't post a link unless you ask me ;)

Topic Closed

This topic has been closed to new replies.

About this Topic