• I am working on a site that is half blog and half portfolio. The front page is the default (Twenty Thirteen, yes I have a child theme) page with the right hand sidebar activated, in other words it looks like a blog. I have a top navigation bar and the first three menu items are “blog,” “ideas,” and “life.” Ideas and Life are blog categories. Then I have menu item “Portfolio.” This is a page. It has a drop down menu to “Drawing,” “Illustration,” and “Design.” And those will have sub pages. I want all of the portfolio pages, sub-pages, etc., to be pages (not posts) and to not have the right hand sidebar displayed. I can’t seem to organize it correctly in my head. I know that TwentyThirteen is meant to be a single column with the optional sidebar…and I can more or less create a custom page for Portfolio (and all the pages that are part of that) but I’m not clear on how to get rid of the right hand sidebar on them.
    Here’s the site: Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wen.wainwright

    (@wenwainwright)

    I’m updating my question. So in TwentyThirteen the right hand sidebar will only show if you are using it. And on some pages I do not want to use it. I looked at the conditional tags information. Now my questions is: should I (or what is the best method) find a way to exclude the sidebar from all the pages I want it excluded from or should I add it to all of the pages I want it on? Part of the problem is that I do want the sidebar on some pages (like “about”) but I can turn those pages into single post pages, right? Then I just don’t want the sidebar on the rest of the pages. I do want the sidebar on all the pages displaying posts.

    Thread Starter wen.wainwright

    (@wenwainwright)

    Hmmm. Maybe I just need three templates? One can be the default, one can be for the sidebar free pages and the third for the pages that will have the sidebar…?

    Thread Starter wen.wainwright

    (@wenwainwright)

    I do want to keep the footer sidebar that is called here:

    </div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I just don’t want the optional right hand sidebar.

    Thread Starter wen.wainwright

    (@wenwainwright)

    This is what I have (which isn’t working because of a parse syntax error on line 27 (there aren’t that many lines) which really isn’t working because I’m sure it’s probably wrong:

    <?php
    function twentytwelve_widgets_init() {
    register_sidebar( array(
    		'name' => __( 'sidebar-header1', 'twentytwelve' ),
    		'id' => 'sidebar-header1',
    		'description' => __( 'Adds a new widget area to the header', 'twentytwelve' ),
    		'before_widget' => '<div id="sidebar-header1" class="sidebar-header1">',
    		'after_widget' => '</div>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }
    elseif ( is_page_template( 'portfolio-page.php') ) {
    	unregister_sidebar( array(
    		'name'          => __( 'Secondary Widget Area', 'twentythirteen' ),
    		'id'            => 'sidebar-2',
    		'description'   => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget'  => '</aside>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    }
    add_action( 'widgets_init', 'twentytwelve_widgets_init' );
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Confusion in regards to page templates’ is closed to new replies.