WordPress.org

Support

Support » Plugins and Hacks » Widget CSS Classes » [Resolved] Plugin not working for me :-(

[Resolved] Plugin not working for me :-(

  • Perhaps I have misunderstood.

    I presume this is the relevant code in wp-includes/widgets.php?:

    function register_sidebar($args = array()) {
    	global $wp_registered_sidebars;
    
    	$i = count($wp_registered_sidebars) + 1;
    
    	$defaults = array(
    		'name' => sprintf(__('Sidebar %d'), $i ),
    		'id' => "sidebar-$i",
    		'description' => '',
    		'class' => '',
    		'before_widget' => '<li id="%1$s" class="widget %2$s">',
    		'after_widget' => "</li>\n",
    		'before_title' => '<h2 class="widgettitle">',
    		'after_title' => "</h2>\n",
    	);

    I have edited this to:

    function register_sidebar($args = array()) {
    	global $wp_registered_sidebars;
    
    	$i = count($wp_registered_sidebars) + 1;
    
    	$defaults = array(
    		'name' => sprintf(__('Sidebar %d'), $i ),
    		'id' => "sidebar-$i",
    		'description' => '',
    		'class' => '',
    		'before_widget' => '<div id="%1$s" class="widget %2$s">',
                    'after_widget'  => '</div>',
    		'before_title' => '<h2 class="widgettitle">',
    		'after_title' => "</h2>\n",
    	);

    But I still cannot get the plugin to work…. Perhaps I have missed something very obvious!

    http://wordpress.org/extend/plugins/widget-css-classes/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Cindy

    @elusivelight

    Hello,

    The code that you need to edit if the plugin is not working is in your theme’s functions.php, which will be located in /wp-content/themes/yourthemename/. It’s possible though that your theme uses a non-standard method or location of registering sidebars. If you’re using a free theme and can’t find the location to edit, I can look at the code if you provide me with the theme URL.

    Hi Cindy,

    Thank you for your prompt response. After looking at another of your answers I had tried another theme and realised that was the problem….

    function register_sidebar does not appear in my functions.php

    I would prefer not to post url in public as is in development, but I will email, if that’s okay

    Thanks again

    Nicola

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Plugin not working for me :-(’ is closed to new replies.
Skip to toolbar