Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: 3 column page #3484
    jencinas
    Member

    I created sidebar2.php based on sidebar.php. Also I created sidebar2 funcion on the function.php page.

    <?php

    /**

    * The Sidebar containing the main widget area.

    *

    * @package Catch Themes

    * @subpackage Simple_Catch

    * @since Simple Catch 1.0

    */

     

    global $post;

    if( $post )

    $layout = get_post_meta( $post->ID,’simplecatch-sidebarlayout’, true );

     

    if( empty( $layout ) || ( !is_page() && !is_single() ) )

    $layout=’default’;

     

    global $simplecatch_options_settings;

    $options = $simplecatch_options_settings;

     

    $themeoption_layout = $options[‘sidebar_layout’];

     

    if( $layout==’left-sidebar’ ||( $layout==’default’ && $themeoption_layout == ‘left-sidebar’) ) {

    echo ‘<div id=”sidebar2″ class=”col4 no-margin-left”>’;

    } else {

    echo ‘<div id=”sidebar2″ class=”col4″>’;

    }

     

    if ( function_exists( ‘dynamic_sidebar’ ) ) {

    //displays ‘sidebar’ for all pages

    dynamic_sidebar( ‘sidebar2′ );

    }

    ?>

    </div><!– #sidebar –>

     

    <?php

    if(!( $layout==’left-sidebar’ ||( $layout==’default’ && $themeoption_layout == ‘left-sidebar’) ) ) {

    echo ‘<div class=”row-end”></div>’;

    }

     

    /**

    * Register sidebars and widget areas.

    */

    function sidebar2() {

     

    register_widget( ‘CustomTagWidget’ );

     

    register_sidebar( array(

    ‘name’          => __( ‘sidebar2’, ‘simplecatch’ ),

    ‘id’            => ‘sidebar2’,

    ‘description’   => __( ‘sidebar2’, ‘simplecatch’ ),

    ‘before_widget’ => ‘<div class=”widget”>’,

    ‘after_widget’  => ‘</div>’,

    ‘before_title’  => ‘<h3>’,

    ‘after_title’   => ‘</h3><hr/>’

    ) );

     

    }

    add_action( ‘widgets_init’, ‘sidebar2’ );

     

    I can see the sidebar2 widget on the widgets page on the admin site, but I cannot see the widget added to sidebar2 on the page.

Viewing 1 post (of 1 total)