• hey, all! hope there’s someone out there who can help me.

    i’m using the threat to creativity theme and would like to add a 3 column widgetized footer. i’ve found a few tutorials that says i should enter this code in my function.php first:

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebars(5,array(
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h4>’,
    ‘after_title’ => ‘</h4>’,
    ));
    ?>

    unfortunately they don’t say where exactly i should put it. my whole original code looks like this:

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar();
    ?>

    <?php function post_thumb() {
    $files = get_children(‘post_parent=’.get_the_ID().’&post_type=attachment&post_mime_type=image’);
    if($files) :
    $keys = array_reverse(array_keys($files));
    $j=0;
    $num = $keys[$j];
    $image=wp_get_attachment_image($num, ‘thumb’, false);
    $imagepieces = explode(‘”‘, $image);
    $imagepath = $imagepieces[1];
    $thumb=wp_get_attachment_image($num, ‘thumb’, false);
    print “$thumb<img src=’$thumb’ class=’thumbnail’ />”;
    endif;
    }
    ?>

    i’ve tried putting the new code on top, and the bottom. i even tried just putting on the new code :S i have no idea where i should insert it.

    thanks to those who can help! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The code to register your sidebars has to be in the functions.php file.
    If you don’t have a functions.php file just create one.

    Greetz,

    Durgé
    Dimics.com

    Thread Starter popmaax

    (@popmaax)

    hey dsdeur, thanks for the reply.

    i already have the function.php but it has a code in it and i don7t know where to insert the new one to register the sidebars for the footer.

    You need to just copy past the code from a normal sidebar but you have to give it a name property, the below code is from Dimics.com the left and center parts of our footer are actual sidebars, you have to copy past this into you functions.php and changes the names, and of course the other modifications like before and after:

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
    	'name'=>'sidebar',  //change this value
    	'before_widget' => '',
    	'after_widget' => '<div class="hr"></div><!--/HR-->',
            'before_title' => '<h1>',
    	'after_title' => '</h1>',
        )); 
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
    	'name'=>'footerleft',
    	'before_widget' => '',
    	'after_widget' => '<div class="hr"></div><!--/HR-->',
            'before_title' => '<h1>',
    	'after_title' => '</h1>',
        ));
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
    	'name'=>'footercenter',
    	'before_widget' => '',
    	'after_widget' => '<div class="hr"></div><!--/HR-->',
            'before_title' => '<h1>',
    	'after_title' => '</h1>',
        ));
    ?>

    When you register the sidebar use:

    <?php if ( !function_exists('dynamic_sidebar')
    || !dynamic_sidebar('footerleft') ) : ?>
    <?php endif; ?>

    and of course change footerleft to the names you”ve chosen.

    Hope this will help.

    Greetz,

    Durgé
    Dimics.com

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Need help with my footer’ is closed to new replies.