ThemeShaper Forums » Thematic

[closed]

Adding duel widget areas below post area on frontpage

(5 posts)
  • Started 9 years ago by hally
  • Latest reply from hally
  • This topic is not resolved
  1. hally
    Member

    Hello

    I would like to know if there is a way to add duel widget areas (side by side) on the frontpage just below the area that shows posts on the frontpage?

    Posted 9 years ago #
  2. hally
    Member

    Not having much success figuring it out.

    Posted 9 years ago #
  3. hally
    Member

    Would I need to use hooks such as thematic_betweenmainasides(), thematic_belowmainasides(), thematic_abovefooter() to get the dual widget areas just below the the post content area on the frontpage?

    Posted 9 years ago #
  4. HI hally-

    Here's a chart that'll help show you where the hooks are located.

    http://bluemandala.com/thematic/thematic-structure.html

    and here's a post by Chris that explains how to use the currrent svn to add sidebars/widget areas.

    http://forums.themeshaper.com/topic/something-new-bout-widgetized-areas

    -Gene

    Posted 9 years ago #
  5. hally
    Member

    Hi thanks for the info what I did was add this code. excluding the above footer aside 3 which I got from this post http://forums.themeshaper.com/topic/how-to-add-widget-areas#post-5514 and then position above footer aside 2 using css. it seemed to work.

    // Register my widget Areas
    function my_widgets_init() {
    if ( !function_exists('register_sidebars') )
    return;
    // Register Widgetized areas.
    // Area 1
    register_sidebar(array(
    'name' => 'Above Footer Aside 1',
    'id' => 'above-footer-aside-1',
    'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
    'after_widget' => '',
    'before_title' => "<h3 class=\"widgettitle\">",
    'after_title' => "</h3>\n",
    ));
    // Area 2
    register_sidebar(array(
    'name' => 'Above Footer Aside 2',
    'id' => 'above-footer-aside-2',
    'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
    'after_widget' => '',
    'before_title' => "<h3 class=\"widgettitle\">",
    'after_title' => "</h3>\n",
    ));
    // Area 3
    register_sidebar(array(
    'name' => 'Above Footer Aside 3',
    'id' => 'above-footer-aside-3',
    'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
    'after_widget' => '',
    'before_title' => "<h3 class=\"widgettitle\">",
    'after_title' => "</h3>\n",
    ));
    }
    add_action( 'init', 'my_widgets_init' );

    // Creates the Above footer Widgets Action Hook
    function above_footer_widgets() {
    do_action('above_footer_widgets');
    } // end thematic_abovefooter

    // Creates the above footer widgets container
    function above_footer_widgets_container() {
    // adds the container div to the widgets
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('above-footer-aside-1') OR is_sidebar_active('above-footer-aside-2') OR is_sidebar_active('above-footer-aside-3') ) {
    //opens the container
    echo '<div id="thematic-above-footer">' . "\n" . '<div id="thematic-above-footer-widgets">' . "\n";
    // calls the widgets
    above_footer_widgets ();
    //closes the container
    echo '</div><!-- thematic-above-footer-widgets -->' . "\n" . '</div><!-- thematic-above-footer -->' . "\n" ;
    }
    }
    add_action('thematic_abovefooter', 'above_footer_widgets_container');

    // adds widget areas to the thematic_abovefooter hook
    function insert_above_footer_widgets() {
    // Area 1
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('above-footer-aside-1') ) {
    echo '<div id="above-footer-aside-1" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
    dynamic_sidebar('above-footer-aside-1');
    echo "\n" . '' . "\n" . '</div><!-- #above-footer-aside-1 .aside -->'. "\n";
    }
    // Area 2
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('above-footer-aside-2') ) {
    echo '<div id="above-footer-aside-2" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
    dynamic_sidebar('above-footer-aside-2');
    echo "\n" . '' . "\n" . '</div><!-- #above-footer-aside-2 .aside -->'. "\n";
    }
    // Area 3
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('above-footer-aside-3') ) {
    echo '<div id="above-footer-aside-3" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
    dynamic_sidebar('above-footer-aside-3');
    echo "\n" . '' . "\n" . '</div><!-- #above-footer-aside-3 .aside -->'. "\n";
    }
    }
    add_action('above_footer_widgets', 'insert_above_footer_widgets');
    ?>

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.