WordPress.org

Ready to get started?Download WordPress

Forums

How do I use the functions.php to change the widgets in my sidebar? (2 posts)

  1. Ninis
    Member
    Posted 5 years ago #

    I have just upgraded my wordpress from version 2.5.1 to 2.7 and everything looks great so far.
    Now I need some help, in my earlier version I used the plugin TTFtitles and it seems to work just fine now. But this plugin just gives you nice titles of yor posts and pages, I want nice titles in my sidebar so in version 2.5.1 I changed the wp-includes/widget.php file. All the functions called wp-widget-XX($args) has been altered and it's the same code that has been changed in all of them:

    <?php echo $before_widget; ?>
    <?php echo $before_title . the_ttftext($title) . $after_title; ?>

    I also changed the default array in the register_sidebar($args = array())

    Now I want to put this in my functions.php file instead, but how do I do that?
    I tried to put the functions just as they were in my functions.php file but that didn't work naturally...
    I tried to send an array with the register_sidebar() by writing

    if ( function_exists('register_sidebar') )
    	register_sidebar(array(
    		'name' => sprintf(__('Sidebar %d'), $i ),
    		'id' => "sidebar-$i",
    etc...

    But I couldn't make it work.

    So I do I do this? How do I make it work? Is there anyone who can help me? Tell me how I must write this code? I know that I can do this in the functions.php file instead but I don't know how!
    I can add that I use two sidebars.
    Thank you for your help.

  2. Ninis
    Member
    Posted 5 years ago #

    Noone who knows?

Topic Closed

This topic has been closed to new replies.

About this Topic