• Resolved Guido

    (@guido07111975)


    Hi,

    The RSS widget breaks the sidebar layout when theme doesn’t use aside for its widgets. In my case theme wraps widgets in a div, so sidebar breaks when adding your RSS widget. I was able to fix it with adding an extra class to your widget, called .widget

    It’s possible to register a widget without this aside or div wrapping. It will use the tags that theme is registering.

    Guido

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Dear Guido,

    Let me look into it, you will get an improved version soon.

    Thanks,
    Fahad

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @guido07111975 I have added a filter hook for this kind of situation so you can add widget class with convenience, actually changing or removing the the tag would be a major change which will disturb other users implementations.

    Try to use the following and let me know:
    add_filter(‘rfw_class_filter’, ‘rfw_class_filter_callback’, 10, 2);

    First parameter would be a string, empty or maybe another style, you simply need to return your class “widget” like this.

    function rfw_class_filter_callback($class=”){
    return $class.’ widget’;
    }

    Thread Starter Guido

    (@guido07111975)

    Hi,

    Did not test your fix yet, but when adding $args['before_widget'] and $args['after_widget'] in your plugin file functions this happens:

    When theme uses div tags for its widgets:

    <div id="rfw_dock-2" class="widget widget_rfw_dock">

    Your wrapper is:

    <aside id="rfw_dock-20" data-class="rfw_dock-2" class="rfw-class  rfw_dock-2">

    I notice your widget adds an extra 0 to the widget ID.
    And I notice other CSS-classes are being used. But you can re-add your classes via function public function __construct().

    So I think this change can be made without breaking much ??

    Guido

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Widget breaks sidebar layout’ is closed to new replies.