WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] customizing page layout for themes (3 posts)

  1. atl_sud
    Member
    Posted 4 years ago #

    Hi all,

    I am attempting to create my first WP site and was wondering if the layout of the pages can be customized.

    For example, on the Home page I was populating the widgets in the left side of the page. When adding new pages, like "Blog" or "Contact" the widget elements are carried over from the home page. Is there a way to customize the side elements for each page? On another page I would like to utilize the entire page without any side navigation elements to showcase my Amazon Astore.

    Is this something that can be done on a WP template?

    Thanks in advance.

    T

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Is there a way to customize the side elements for each page?

    Yes - by creating different sidebar files (eg sidebar-two.php, sidebar-three.php etc) and then calling the appropriate sidebar based on the is_page conditional in your theme's page.php template. Eg:

    <?php if( is_page('About' ) ) get_sidebar('two');
    elseif( is_page('Contact' ) ) get_sidebar('three');
    else get_sidebar();?>
  3. ke vinritt
    Member
    Posted 4 years ago #

    sorry - in wrong place

Topic Closed

This topic has been closed to new replies.

About this Topic