Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Sidebars & Widgets »

I cant see text widgets id in wordpress


  #1  
Old Dec 19, 2010, 10:30 PM
sash_007
 
3 posts · Dec 2010
Help 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
  #2  
Old Dec 20, 2010, 01:01 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what version of Atahualpa and WP?
What is your url pointing to an example?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Dec 25, 2010, 11:22 PM
sash_007
 
3 posts · Dec 2010
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>',
));
 
 
 
 
?>
  #4  
Old Dec 26, 2010, 04:52 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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)
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Dec 27, 2010, 12:03 AM
sash_007
 
3 posts · Dec 2010
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

Bookmarks

Tags
text widget styling

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
php in text widgets? lauras2010 Sidebars & Widgets 3 Oct 8, 2010 03:02 PM
Text Widgets yunusb2k Sidebars & Widgets 1 Sep 28, 2009 05:11 AM
BUGFIX 342: Can't change text font, in text widgets Leoni Old Version fixes and change logs 3 Aug 5, 2009 04:30 AM
[SOLVED] Styling text widgets Insane Artist Sidebars & Widgets 2 Jul 17, 2009 06:36 PM


All times are GMT -6. The time now is 02:31 PM.


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