Support » Plugin: Off-Canvas Sidebars & Menus (Slidebars) » Icon for off canvas shortcut

  • Resolved niikk

    (@niikk)


    Hello,

    I want use the off canvas panel to show my product filters.

    I insert the Button to open the off canvas via Shortcode and it works great! But now i’m trying to insert a icon before the open canvas button. Like “<icon> <Button Text>”. Is there a hook which I can use or another way?

    <?php
    echo do_shortcode('[ocs_trigger id="productfilter01" element="button" text="FILTER OPTIONEN"]');
    
    ?>

    Cheers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @niikk

    No, there are no before or after filters/parameters available at this point.
    However, you can use icon classes if you use and icon fonts like FontAwesome or Dashicons. More info here: https://github.com/JoryHogeveen/off-canvas-sidebars/wiki/Shortcodes

    I might add before and after parameters in the next release.

    Cheers, Jory

    Hi @keraweb

    Thanks for your fast reply!

    Right, I want to use a icon from FontAwesome. (https://fontawesome.com/v4.7.0/icon/bars)
    Now I use the “icon” to place the icon befor the filter button text.

    do_shortcode('[ocs_trigger id="productfilter01" icon="fa fa-bars" element="button" text="FILTER OPTIONEN"]');

    But now there is no space between the icon and the text. Do I have to do this cia CSS “margin-right: 10px;” or is there another way?

    .fa-bars{
    	margin-right: 10px !important;
    }

    Cheers

    • This reply was modified 3 months, 3 weeks ago by niikk.
    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @niikk

    Correct, you’ll have to use CSS to properly style the elements.
    This plugin does not include any form of styling for triggers or sidebars.

    Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.