Forum Moderators: coopster

Message Too Old, No Replies

styling wordpress sidebar widgets

         

newdude

8:00 pm on Apr 28, 2010 (gmt 0)

10+ Year Member



on this site (http://example.com/wordpress/), I want to get my widgets (depicted as "Text Widget Test 1" and "Text Widget Test 2") to be styled just like the ADVERTISING and FOLLOW OUR UPDATES sidebar sections where they have a the curved corners.

please advise how i edit the php in the "sideb" div at the top of my sidebar.php file to get it to look like this, and match the other sidebar items?

and i dont know if it helps, or is related, but there's a section of code in my functions.php file that i think is related:

if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<li class="widget">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widget">',
'after_title' => '</h2>',
));
?>

[edited by: eelixduppy at 8:45 pm (utc) on Apr 28, 2010]
[edit reason] no URLs, please. See Charter [/edit]

eelixduppy

9:02 pm on Apr 28, 2010 (gmt 0)



Wordpress is a pain to hack around like this. You are going to need to look at the source code and figure out where the widgets panel is being created then modify the HTML/CSS/PHP to mirror that of the sidebars.

newdude

9:22 pm on Apr 28, 2010 (gmt 0)

10+ Year Member



thanks but what do you mean, where the widgets panel is created? what sort of stuff am i looking for and where should i be looking?

eelixduppy

9:25 pm on Apr 28, 2010 (gmt 0)



I haven't looked at wordpress code in a long time, but everything is created in modular pieces through PHP. You have to find out, by examining the code, where that widget is coming from in order to modify its code. There might even be templates or ways for you to change these appearances without altering the code. It really depends.

newdude

12:30 am on Apr 30, 2010 (gmt 0)

10+ Year Member



i got it figured out. i toyed with it and now it looks like this and works.

`
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<li class="widget">',
'after_widget' => '<div class="sidebar-bottom-widget"></div></li>',
'before_title' => '<h2 class="widget">',
'after_title' => '</h2>',
));`

eelixduppy

3:58 pm on Apr 30, 2010 (gmt 0)



There you go. Glad you figured it out.

If you plan on hacking more Wordpress, you might be in for some headaches. ;)