Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   I cant see text widgets id in wordpress (http://forum.bytesforall.com/showthread.php?t=11805)

sash_007 Dec 19, 2010 10:30 PM

I cant see text widgets id in wordpress
 
Hello friends,
I am new to this forum and this is my first post here hoping to learn a lot from the experts here

i am having some issues with text widget styling i want to style different text widgets differently for that i have learnt from this forum herethat i have to view the source code to see the text widget but my problem is i cant see any id or class with my text widget only i see <div class="textwidget"> i guess its disabled somewhere i am pretty new to wordpress so can anyone point me to the right direction?


thank you

juggledad Dec 20, 2010 01:01 PM

what version of Atahualpa and WP?
What is your url pointing to an example?

sash_007 Dec 25, 2010 11:22 PM

thanks i am working on local host any way i got it sorted my previous function was
this
PHP Code:

<?php

if ( function_exists('register_sidebar') ) {
    
register_sidebar(array(
    
'name'=>'sidebar1',
        
'before_widget' => '<li id="%1$s" class="sidebaritem">',
        
'after_widget' => '</li>',
        
'before_title' => '<h2 class="widgettitle">',
        
'after_title' => '</h2>',
    ));
    
    
register_sidebar(array('name'=>'sidebar2',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));

register_sidebar(array('name'=>'sidebar3',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));

register_sidebar(array('name'=>'sidebar4',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));



?>

which i changed to this
PHP Code:

<?php
 
if ( function_exists('register_sidebar') )
    
register_sidebar(array(
        
'name'=>'sidebar1',
        
'before_widget' => '<li id="%1$s" class="sidebaritem">',
        
'after_widget' => '</li>',
        
'before_title' => '<h2 class="widgettitle">',
        
'after_title' => '</h2>',
    ));
        
        
register_sidebar(array('name'=>'sidebar2',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'sidebar3',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'footer1',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'footer2',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'footer3',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'footer4',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'footer5',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'navigation',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'content1',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
register_sidebar(array('name'=>'freebies',
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h4>',
'after_title' => '</h4>',
));
 
 
 
 
?>


juggledad Dec 26, 2010 04:52 AM

You should try to avoid changing the theme code. In this case I see no need and you will have to go back and change it each time there is an upgrade.

You should look at the source of one of your blog pages (the front end) and there you will see the ID or class assigned to the widget which you can use for styling

So when you saw 'look at the source' it meant look at the source of the page being displayed NOT look at the themes source code (the php files)

sash_007 Dec 27, 2010 12:03 AM

ya its true but i was editing a theme which didnt had many widget options so i just copied the existing ones and pasted without knowing the difference but later someone pointed me in the right direction


All times are GMT -6. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.