Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
custom side-by-side widgets « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

custom side-by-side widgets

(7 posts)
  • Started 3 years ago by candregg
  • Latest reply from helgatheviking
  • This topic is not resolved

  1. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    I am trying to add several widgets to the Thematic child theme sidebar. Some have worked; some not. I have successfully added a custom widget above the Primary. Now I am trying to add a Left and Right widget side-by-side between the primary and secondary widget areas.

    Here is the function code (in parts):

    // Add additional Widget
    // Create your widget area
    function my_widgets_init() {
        register_sidebar(array(
           	'name' => 'Community',
           	'id' => 'community',
           	'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
           	'after_widget' => "",
    		'before_title' => "<h3 class=\"widgettitle\">",
    		'after_title' => "</h3>\n",
        ));
    
        register_sidebar(array(
           	'name' => 'Left',
           	'id' => 'left',
           	'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
           	'after_widget' => "",
    		'before_title' => "<h3 class=\"widgettitle\">",
    		'after_title' => "</h3>\n",
        ));
    
        register_sidebar(array(
           	'name' => 'Right',
           	'id' => 'right',
           	'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' );
    
    // adding the widget area to your child theme
    
    function my_community_widget() {
        echo '<div id="community" class="aside">'?>
        <ul class="community">
    </code>
    <code>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss.png" width="32" height="32" /></a></li>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/email.png" width="32" height="32" /></a></li>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/facebook.png" width="32" height="32" /></a></li>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/twitter.png" width="32" height="32" /></a></li>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/linkedin.png" width="32" height="32" /></a></li>
    <li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/youtube.png" width="32" height="32" /></a></li>
        </div>
    	<?php
    }
    
    add_action('thematic_abovemainasides','my_community_widget');
    
    //  Adding Left and Right Widgets
    
    function my_left_widget() {
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('left') ) {
        echo '<div id="left" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
        dynamic_sidebar('left');
        echo '' . "\n" . '</div><!-- #left .aside -->'. "\n";
    }
    }
    add_action('thematic_betweenmainasides','my_left_widget');
    
    function my_right_widget() {
    if ( function_exists('dynamic_sidebar') && is_sidebar_active('right') ) {
        echo '<div id="right" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
        dynamic_sidebar('right');
        echo '' . "\n" . '</div><!-- #right .aside -->'. "\n";
    }
    }
    add_action('thematic_betweenmainasides','my_right_widget');

    Here is the css:

    #left {
    	margin: 0;
    	padding: 12px;
    	width: 126px;
    	float: left;
    }
    
    #right {
            margin:0;
            padding:12px;
    	float: right;
    	width: 126px;
    }

    The Community widget went in perfectly, and looks great! Further down, while the Left and Right widget areas appear in the Admin area, only the Left widget content is visible on the webpage. Please see http://seacliffmm.com/prod/indigest/admin/.

    Any help?

    Once I get this one figured out, I need to make six different Primary widget areas that will appear based on which category or page is active. That will be another topic.

    Thanks!

    Caron

    Posted 3 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    there isn't a right widget in your markup. you might not have a widget in it.

    Posted 3 years ago #

  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    The widget exists in the admin area, and I have it populated with content almost identical to that in Left. I have also verified that the content exists.

    But, no, it doesn't show in the source code or online. That's the problem. What I need to figure out is Why. And of course, how to fix it.

    Posted 3 years ago #
  4. bogh
    Member

    HI,

    Here is a thematic widget like I use it:

    class Footer_Text_Widget extends WP_Widget {
    function Footer_Text_Widget() {
    		$widget_ops = array('classname' => 'widget_footer_text', 'description' => __( "Add some text to your footer.") );
    		$this->WP_Widget('footer_text_widget', __('Footer_Text_Widget', 'thematic'), $widget_ops);
    	}
    function update($new_instance, $old_instance) {
    		// processes widget options to be saved
    		return $new_instance;
    	}
    function widget($args, $instance) {
    		// outputs the content of the widget
    		extract($args);
    
    		echo $before_widget;
    		?>
    			<?php echo $before_title; ?><?php echo $footer_text_widget_title; ?><?php echo $after_title; ?>
    			<ul>
    				<li>//Your Code Here</li>
    			</ul>
    		<?php
    		echo $after_widget; }
    		}
    }
    register_widget('Footer_Text_Widget');
    Posted 3 years ago #

  5. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    well had to ask the obvious esp, b/c i just dropped this into my local install and the widgets do appear in the markup as expected. so there is something else going on here. try putting a different widget in the right sidebar?

    Posted 3 years ago #

  6. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    candregg

    Member

    I changed the padding and margins of the containing widgetareas and it finally worked. Thanks! Now on to those conditional Primary widget variants...

    Posted 3 years ago #

  7. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    well as i mentioned in the something new bout widgets thread... its all the same except for where you have your conditionals

    add an extra condition to this to make it only display in certain places

    if ( function_exists('dynamic_sidebar') && is_sidebar_active('right') ) {
    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183