WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Twitter Widget Pro] Css Classes not applying.

[Resolved] [Plugin: Twitter Widget Pro] Css Classes not applying.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aaron D. Campbell

    @aaroncampbell

    Probably means your theme doesn’t declare it’s sidebars properly. Can you link to your site as well as your theme?

    Roggers

    @roggers

    http://alexrodrigues.co.uk/ it’s my custom theme
    Here is the code for sidebar deceleration in functions.php

    if ( function_exists( 'register_sidebar' ) ) {
    register_sidebar( array (
    'name' => __( 'Primary Sidebar', 'primary-sidebar' ),
    'id' => 'primary-widget-area',
    'description' => __( 'The primary widget area', 'dir' ),
    'before_widget' => '<div class="col2 widget">',
    'after_widget' => "</div>",
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    Plugin Author Aaron D. Campbell

    @aaroncampbell

    Thanks. The before_widget part should have an id of %1$s (to be replaced with the id of the widget) and a class of %2$s to be replaced with the class for the widget (in this case widget_twitter). So try something like this:

    register_sidebar( array (
    	'name' => __( 'Primary Sidebar', 'primary-sidebar' ),
    	'id' => 'primary-widget-area',
    	'description' => __( 'The primary widget area', 'dir' ),
    	'before_widget' => '<div id="%1$s" class="col2 widget %2$s">',
    	'after_widget' => "</div>",
    	'before_title' => '<h3 class="widget-title">',
    	'after_title' => '</h3>',
    ) );
    Roggers

    @roggers

    Thanks, it worked! I’ll be sure to use this method when declaring sidebars.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: Twitter Widget Pro] Css Classes not applying.’ is closed to new replies.