Topic: Add new bottom content widget

How do i add a third bottom content widget?

Same dimensions and everything.

All help appreciated. Thanks!

Re: Add new bottom content widget

Did you find a solution to this?

Thumbs up

Re: Add new bottom content widget

Single sidebar and on the same row?

Re: Add new bottom content widget

dgodfather wrote:

Single sidebar and on the same row?


You have lost me,

You can see the area that needs filling with a new widget area to the right of the calender.

(see attached file)

Last edited by Speedingorange (2011-05-01 18:19:15)

Post's attachments

Capture.JPG 150.85 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Thumbs up

Re: Add new bottom content widget

Your using the single column setup. I was speaking of the 2-column sidebar setup.

I'll have a look at it and let you know what I've come up with. I've been able to add widget areas successfully in the past.

Re: Add new bottom content widget

Cool,

I have managed to duplicate "bottom-content 2"

e.g.

<div id="bottom-content-2">
    <?php if ( isset($sidebars['sidebar-5']) ) : ?>
    <ul class="clearfix xoxo">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
        <li></li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>
</div>
<div id="bottom-content-2">
    <?php if ( isset($sidebars['sidebar-5']) ) : ?>
    <ul class="clearfix xoxo">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
        <li></li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>
</div>

This works fine and when the widget width is reduced to 310px formats correctly.

So It is just giving this new widget area its own name and making it show on the admin widget page that I could do with a hand with smile

James

Last edited by Speedingorange (2011-05-01 18:23:43)

Thumbs up

Re: Add new bottom content widget

If I remember correctly you have to open launcher.php

Find:

register_sidebar( array(
    'name' => 'Bottom Content #2',
    'before_widget' => '<li id="%1$s" class="widgetcontainer clearfix">',
    'after_widget' => '</li>',
    'before_title' => '<h5 class="widgettitle">',
    'after_title' => '</h5>'
) );

Add below that, this:

register_sidebar( array(
    'name' => 'Bottom Content #3',
    'before_widget' => '<li id="%1$s" class="widgetcontainer clearfix">',
    'after_widget' => '</li>',
    'before_title' => '<h5 class="widgettitle">',
    'after_title' => '</h5>'
) );

You then just create a new CSS style for the new widget.

Re: Add new bottom content widget

Hmm, got it sort of working,

As soon as i add those rules to my launcher.php however I lose all my footer widgets, not sure why?

Also should i need to change the number of the widget area

<?php if ( isset($sidebars['sidebar-5']) ) : ?>

as in from the above code?

Could the launcher code some how be conflicting with the code for the footer widgets?

Last edited by Speedingorange (2011-05-02 05:07:09)

Thumbs up

Re: Add new bottom content widget

Yea change that number as well. Like I said it's been a while since I looked at it.

Re: Add new bottom content widget

Really appreicate the help. Will take another look see if I can make it play nice,

smile

Thumbs up

Re: Add new bottom content widget

Working!

Thanks ever so much for the help!

James

Thumbs up

Re: Add new bottom content widget

Just to summarize for the rest of you... (I've also add this to my FAQ/common questions & alternate solutions post)

Open launcher.php

Find:

register_sidebar( array(
    'name' => 'Bottom Content #2',
    'before_widget' => '<li id="%1$s" class="widgetcontainer clearfix">',
    'after_widget' => '</li>',
    'before_title' => '<h5 class="widgettitle">',
    'after_title' => '</h5>'
) );

Add below that, this:

register_sidebar( array(
    'name' => 'Bottom Content #3',
    'before_widget' => '<li id="%1$s" class="widgetcontainer clearfix">',
    'after_widget' => '</li>',
    'before_title' => '<h5 class="widgettitle">',
    'after_title' => '</h5>'
) );

Open home.php

Find:

<div id="bottom-content-2">
    <?php if ( isset($sidebars['sidebar-5']) ) : ?>
    <ul class="clearfix xoxo">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
        <li></li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>
</div>

Duplicate this, rename the CSS style and add it just below the original.

Example:

<div id="bottom-content-2">
    <?php if ( isset($sidebars['sidebar-5']) ) : ?>
    <ul class="clearfix xoxo">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #2') ) : ?>
        <li></li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>
</div>
<div id="bottom-content-3">
    <?php if ( isset($sidebars['sidebar-6']) ) : ?>
    <ul class="clearfix xoxo">
        <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom Content #3') ) : ?>
        <li></li>
        <?php endif; ?>
    </ul>
    <?php endif; ?>
</div>

Now all you need to do is add a new style called "bottom-content-3" to your user.css.

*Note: The above code may need to be modified slightly from site to site, but this should get you in the right direction.

Re: Add new bottom content widget

Thanks. It helped me too, but partially : (. I am struggling with a slightly modified but related requirement & I have posted http://www.arrastheme.com/forums/post27845.html#p27845 on the forum. Possible to help with my specific requirement?

Thumbs up

Re: Add new bottom content widget

I'm not sure that would be ideal either as if you had a large number of comments your widget areas would be really far down on the page. You still care to do this?