The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

How to build separate, differing page templates (3 posts)

  1. baggi-t
    Posted 5 years ago #

    I'm building my first website in WP. I want to build a website in which some pages have different designs, in particular, I want different widgets in the sidebars on different pages. I have generated a separate template for one page design, and left my postings page set to 'default template'. When I add a widget to the side bar on my posting page ie: in the 'default' template, WP also adds it to the 'named' template.

    I realise this is because my named.php file is calling on the same files for the sidebar that index.php is using. How do I 'freeze' the side bar in named.php so that it does not pick up subsequent changes to index.php. I realise I can hand code a fix for this but am hoping there is a quicker and easier way in WP.

    Please advise

  2. Chip Bennett
    Theme Review Admin
    Posted 5 years ago #

    Use the Widget Logic Plugin

  3. fonglh
    Posted 5 years ago #

    Or you could edit sidebar.php. Use the conditional functions and call different widget areas with dynamic_sidebar()

Topic Closed

This topic has been closed to new replies.

About this Topic