Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #287608
    3lias
    Member
    Post count: 128

    Hi,

    is there a way to use Dashicons in a Icon Box?

    When I use for example dashicons-book-alt the icon is not shown with the code

    [sf_iconbox image="dashicons-book-alt" type="boxed-one" color="accent" title="documentation" animation="fade-in" animation_delay="200"]Documentation[/sf_iconbox]

    Any idea how to get it working?

    Thanks

    Elias

    #287796
    David Martin – Support
    Moderator
    Post count: 20834

    You cannot use that on the front-end as the CSS for the Dashicons is not registered there. To use the icons on the front-end you will need to activate your child theme and add these following to your child theme functions.php file.

    /********************************************************/
    // Adding Dashicons in WordPress Front-end
    /********************************************************/
    add_action( 'wp_enqueue_scripts', 'sf_load_dashicons_front_end' );
    function sf_load_dashicons_front_end() {
      wp_enqueue_style( 'dashicons' );
    }
    #287885
    3lias
    Member
    Post count: 128

    Works perfect, thanks! 🙂

    #287893
    David Martin – Support
    Moderator
    Post count: 20834

    Anytime!

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register