Support » Theme: Coraline » [Theme: Coraline] save different page templates with custom widget area

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,
    good morning

    is there no one woh can help me or is this a bad question?

    best regards
    ceffi

    I would like to know the answer to this also. Or to have an option to choose a one-or-two-column template when creating individual pages.

    Anita

    hi,
    i found an option, it’s a two part modifications :
    in functions.php i added the id’s post where i wanted a 2cols template 3 by default for me) to give some space for a forum ; the first modifications is for the classes added to body tag.

    Find this function and add this line at the begining

    function coraline_current_layout() {
    $pagesforum = array(0,4,5,6,7,8,9) // line to add ; define the ids for 2 cols instead of 3 cols by default;

    Add this line for the first test and modify if to elseif

    if (in_array(get_the_ID(),$pagesforum) || is_single() || is_page())
    		return 'two-column ' . 'content-sidebar';
    	elseif ( in_array( $current_layout, $two_columns ) )
    		return 'two-column ' . $current_layout;

    Then in sidebar.php encapsulate the sidebar you want to get rid of based on your test
    define the array of pages where you don’t want 3 cols by adding this line

    <?php $pagesforum = array(0,4,5,6,7,8,9); ?>

    then add this tag around the sidebar code (ie <div id=”primary” class=”widget-area” role=”complementary”>)

    <?php if (!in_array(get_the_ID(),$pagesforum) && !is_single() && !is_page()) : ?>
    <div id="primary" class="widget-area" role="complementary">

    then after the closing div add

    <?php endif; // ends the check 2 cols ?>

    Hope that helps

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Theme: Coraline] save different page templates with custom widget area’ is closed to new replies.