Support » Plugin: Q2W3 Fixed Widget for WordPress » use different options for different widget sidebire

  • Hello,
    maybe it’s a simple question but I can’t find this option in settings.
    I created one widgetised sidebar and works perfectly with your plugin.
    Now I need to create another one but this one should have different general setting such as STOP-ID and margin … how can I manage that?
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello
    is there anybody there that can help me?
    Thank you!

    Plugin Contributor Max Bond

    (@max-bond)

    Hello!

    Well… Right now you cannot accomplish your task from admin panel.
    But you can try manual config:
    1. Copy your current plugin config from page html-source. It looks like:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var q2w3_sidebar_options = [{"sidebar":"sidebar-1","margin_top":15,"margin_bottom":130,"stop_id":"fixed-stop","screen_max_width":1024,"screen_max_height":600,"width_inherit":false,"refresh_interval":2000,"window_load_hook":false,"disable_mo_api":false,"widgets":["meta-19","shortcodes-ultimate-2"]},{"sidebar":"sidebar-2","margin_top":15,"margin_bottom":130,"stop_id":"fixed-stop","screen_max_width":1024,"screen_max_height":600,"width_inherit":false,"refresh_interval":2000,"window_load_hook":false,"disable_mo_api":false,"widgets":["meta-20"]}];
    /* ]]> */
    </script>

    You can see here different settings for different sidebars. Change second sidebar options and save this code to some temporary place.
    2. Now edit wp-content/plugins/q2w3-fixed-widget/q2w3-fixed-widget.php.
    You have to find function enqueue_scripts and comment (disable) self::wp_localize_script(); call:

    public static function enqueue_scripts() {
      self::custom_ids();
      self::fixed_wigets();
      wp_enqueue_script('jquery');
      wp_enqueue_script(self::ID, plugin_dir_url( __FILE__ ) . 'js/q2w3-fixed-widget.js', array('jquery'), self::VERSION, true);
      //self::wp_localize_script();
    }

    3. Insert config code to your site footer.

    This should work… in theory )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘use different options for different widget sidebire’ is closed to new replies.