WordPress.org

Ready to get started?Download WordPress

Forums

How To Change "class" of widgets!! (16 posts)

  1. sahinerbay
    Member
    Posted 11 months ago #

    Hey everyone i need to edit my side bar's widget's class so i can style them different from others. http://moms-couponmatic.com/

    i know the widgets ids and classes. but cant locate them in ftp. i have already checked wp-includes/widgets or wp-admin/widgets.php.

  2. esmi
    Forum Moderator
    Posted 11 months ago #

    Stay out of the wp-admin & wp-includes folders and all WordPress core files. As you are using a non-WPORG theme, you need to seek support from the theme's developers - paid or otherwise. We only support themes downloaded from wordpress.org here.
    Try http://ithemes.com

    And bear in mind that you may need to create a child theme for your changes.

  3. sahinerbay
    Member
    Posted 11 months ago #

    Thank you for the replay. I don't think they will give any support. Yeah i have made changes a lot on this theme. I am sure there will be no theme update in the future and since i didn't touch wp-admin & wp-includes folders, i don't think i will have any problems on wordpress updates.

    Do you agree?

  4. sahinerbay
    Member
    Posted 11 months ago #

    and where do they usually locate those "widget's class" stuffs on WPORG themes?

  5. Lorenzo Orlando Caum
    Member
    Posted 11 months ago #

    Take a look at your themes stylesheet.

    It may be in a location similar to this:

    wp-content/themes/yourthemefolder/style.css

    Also see this screenshot for the CSS styles that are currently being used on your sidebar widgets (bottom right):

    http://cl.ly/image/2Y1t2f460506

  6. Zakir Sajib
    Member
    Posted 11 months ago #

    to change the widget class you need to go functions.php of your activated theme and find the code which says sidebar, register related. or try to search with the name of widget class.

    you may see <div class="widget title">...,

    then change the class name whatever you want...

  7. Zakir Sajib
    Member
    Posted 11 months ago #

    to explain bit further i can show following code which is used to display sidebar.

    <?php $args = array(
    	'name'          => __( 'Sidebar name', 'theme_text_domain' ),
    	'id'            => 'unique-sidebar-id',
    	'description'   => '',
            'class'         => '',
    	'before_widget' => '<li id="%1$s" class="widget %2$s">',
    	'after_widget'  => '</li>',
    	'before_title'  => '<h2 class="widgettitle">',
    	'after_title'   => '</h2>' ); ?>

    now see class="widget part in above code. now change the widget to something meaningful and use this classs to style in css.

    hope it helps.

  8. sahinerbay
    Member
    Posted 11 months ago #

    Thank you for help zakir. This is all i have in my functions.php of currently activated theme

    <?php
    if ( function_exists('register_sidebars') )
        register_sidebars(2);	add_theme_support( 'post-thumbnails' );
    ?>

    I think, i need to add some code myself. I am sure the theme i am using doesnt have those codes you just wrote

  9. Zakir Sajib
    Member
    Posted 11 months ago #

    can you please mention the theme u using?

  10. Zakir Sajib
    Member
    Posted 11 months ago #

    You using theme from http://ithemes.com ?

    In that case that theme used somewhere else the above code, not in functions.php as you mentioned.

    Try to look at other folders in your theme.

  11. sahinerbay
    Member
    Posted 11 months ago #

    Yes i am. it might be. i have checked all files through, but couldnt find it. (anyway there is only 10 files under theme folder.

  12. sahinerbay
    Member
    Posted 11 months ago #

    also checked r_sidebar.php and found nothing. do you think they would keep those codes somewhere else and not under active theme folder?

  13. Zakir Sajib
    Member
    Posted 11 months ago #

    Are you using child theme?

  14. Zakir Sajib
    Member
    Posted 11 months ago #

    I need to download the theme and take a look.
    Hang on

    oh it is not free !!

    in that case I think you need to ask help from ithemes.

  15. sahinerbay
    Member
    Posted 11 months ago #

    i am not using child theme and it's free. here it is
    [Link removed]

  16. esmi
    Forum Moderator
    Posted 11 months ago #

    I'm sorry but as you are using a non-WPORG theme, you need to seek support from the theme's developers - paid or otherwise. We only support themes downloaded from wordpress.org here.

Reply

You must log in to post.

About this Topic

Tags