Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @muhammetdkaya,

    There is a number of ways to achieve this. Probably one of the simplest – you can set left arrow symbol code, i.e. ← as “Button label” in our widget’s settings.

    Please let me know if that’s not good enough, and I’ll come up with other solutions.

    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    I do not use widgets. I am using shortcode in header.

    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    function alg_back_button_shortcode( $atts ) {
    $defaults = array(
    ‘label’ => __( ‘Back’, ‘back-button-widget’ ),
    ‘class’ => ”,
    ‘style’ => ”,
    ‘type’ => ‘input’,
    ‘js_func’ => ‘back’,
    ‘hide_on_front_page’ => ‘no’,
    ‘lang’ => ”,
    ‘not_lang_text’ => ”,
    );

    Which code should I change for the icon?

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @muhammetdkaya,

    It’s the label attribute, i.e. with shortcode:

    [alg_back_button label="←"]

    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    can I add font awesome icon ?

    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    also dont work code “[alg_back_button label=”←”]”

    https://hizliresim.com/rf4F37

    • This reply was modified 3 years, 11 months ago by muhammetdkaya.
    • This reply was modified 3 years, 11 months ago by muhammetdkaya.
    Plugin Author Algoritmika

    (@algoritmika)

    @muhammetdkaya,

    Yes, you can add Font Awesome with e.g.:

    
    [alg_back_button type='simple' label='<i class="fas fa-angle-double-left"></i>']
    

    As for “… also dont work code…” – I’m not sure if I got it correctly, but if you are outputting it with PHP, you can do it with:

    
    $my_fa_icon = '<i class="fas fa-angle-double-left"></i>';
    echo do_shortcode( "[alg_back_button type='simple' label='" . $my_fa_icon . "']" );
    
    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    I added but dont work your code.

    look at the image.

    https://hizliresim.com/zpOZu2

    Plugin Author Algoritmika

    (@algoritmika)

    @muhammetdkaya,

    I’m still not sure if you are adding it via PHP? If not – please try my first example:

    
    [alg_back_button type='simple' label='<i class="fas fa-angle-double-left"></i>']
    
    Plugin Author Algoritmika

    (@algoritmika)

    @muhammetdkaya,

    If that doesn’t help – please update the plugin to the latest v1.2.4 that we’ve just released. There I’ve added special fa attribute to the shortcode – now you can use Font Awesome like this:

    
    [alg_back_button fa="fas fa-angle-double-left"]
    
    Thread Starter muhammetdkaya

    (@muhammetdkaya)

    it is work now! thanks!

    Plugin Author Algoritmika

    (@algoritmika)

    @muhammetdkaya,

    Happy to hear it’s solved 🙂 Please let me know if you need anything else.

    And if you like the plugin, please consider leaving me a rating.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘add icon’ is closed to new replies.