Support » Fixing WordPress » how to include/exclude sidebar on some pages

  • Resolved xrundel1

    (@xrundel1)


    Hi

    I have 3 different layouts on site, one part should include sidebar #1, second part should include sidebar #2, and third part should not show any sidebar at all to use full width of page.
    Sidebars located in header that is base for entire layout, so it very difficult to insert sidebars in different page/post templates.

    Codex said somehow I can use – is_page_template( ‘about.php’ )…

    How I can include/exclude sidebars by specifying templates list?

    Any help appreciated! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • When changing theme files, make sure you are using a child theme.
    Your theme probably uses a function to produce the banner/navigation on each page, you will put the above code:

    if(is_page_template( 'about.php' )) place widget/sidebar etc

    into this function.

    Thread Starter xrundel1

    (@xrundel1)

    Super! Thank you! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to include/exclude sidebar on some pages’ is closed to new replies.