Site logo

Archived topic

Dashicons not working with GeneratePress theme

16 replies · Started by Edwin on May 12, 2020

Viewing posts 1–15 of 17

Hi

I am using Mega Menu in Generate press, but somehow Dash-icons is not showing. I tried it with default Theme and it working.
Any idea? Already disabled all the plugins

Thanks

Edwin

Hi there,

add this PHP Snippet to enable them on the front end:

add_action( 'wp_enqueue_scripts', 'load_dashicons_front_end' );
function load_dashicons_front_end() {
  wp_enqueue_style( 'dashicons' );
}

Thanks David

unfortunately, i didn't work.

Where did you add the code ? Is it still added ?

Hi David

I am using Code Snippets and yes, it is still added to the website

I cannot see the request on the frontend - Do any of the other plugins have an option to Disable dash icons ?

Hi David

No, and not showing either with all other plugins disabled, but working when theme is changed to default.

Are you using a Child Theme or any custom functions ?

If not try this script:

add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_style( 'dashicons' );
} );

Make sure its an exact copy and there are no curly quotes or other odd characters

Hi David

No, i am not using a child theme and for the functions i use the Snippets plugin.

Hi David

Thanks, but still not working

Would you be willing to provide us with temporary admin access to the site so i can see what the issue is ?

If so you can send the login via the Account Issue form:

https://generatepress.com/contact/

Please add the URL of this topic to the form so we can track

Hi there,

Can you disable your caching plugin so we can take a closer look at your HTML?

Hi Tom
I have disabled the Litespeed plugin

Strange, the code David provided should add it to your site.

Can you try this?:

add_action( 'wp_enqueue_scripts', function() {
    wp_enqueue_style( 'dashicons' );
}, 100 );

Is the Code Snippet activated?

If so, one of your plugins may be dequeuing it for some reason.

This archived topic is closed to new replies.