Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End hide sidebar in wordpress

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #28684
    kloy
    Member

    I want to be able to hide the side bar on some pages. I don’t think this is correct, this is the basic idea…
    Can we use the word ‘hide’ like ‘get’….what’s the proper syntax

    Code:


    #73435

    That won’t exactly work… WordPress doesn’t really have hide functionality like that.

    Actually, you might want to think about this in a slightly different way:

    Code:

    What this code does is check if the current page is not the marketplace page (the "!" indicates not) and then displays the sidebar. You could also do this with multiple pages:

    Code:

    The "||" in the if statement indicates "and", so this reads "if the page is not marketplace, and it isn’t page2, and it isn’t page3, show the sidebar. If it is one of these pages, the sidebar won’t be shown.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.