WordPress.org

Support

Support » How-To and Troubleshooting » Help with variables like $single, $month, etc

Help with variables like $single, $month, etc

  • joshteeters
    Member

    @joshteeters

    I’m trying to get my sidebar to show different things based on what kind of page you’re on. I’ve got it working how I want thus far. I’ve removed various elements from the sidebar whenever a user is on a single post page or a month listing.

    I did this by using:

    ‘if (!$single && !$month) { display stuff }’

    I want to remove the same elements from PAGES, as well, and I don’t know the variable for it. (I tried $page, which didn’t work.) Is there a list of the variables? Or could someone at least tell me the variable I need to add to my IF statement to remove the sidebar elements from pages?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with variables like $single, $month, etc’ is closed to new replies.