Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was unable to display the 'dashicons-admin-home' icon in the primary navigation of their WordPress site across subdirectories.
Solution:
We identified that the issue was due to dashicons not being loaded on the front-end because the site used different logins, and wp-admin wasn't loaded by default. To resolve this, we recommended loading dashicons on the front-end. You can add the following line to your theme's functions.php file:

wp_enqueue_style('dashicons');

For more details, you can refer to this StackOverflow discussion.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Shekhar Bhandari 1 month, 2 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
December 18, 2024 at 9:33 pm #16527814

bernhardG-5

Background of the issue:
I am trying to display a 'dashicons-admin-home' icon in the primary navigation of my WordPress site, hidden link. However, it does not appear in the subdirectories.

Symptoms:
The 'dashicons-admin-home' icon does not appear in the subdirectories of my site.

Questions:
Why does the 'dashicons-admin-home' icon not appear in subdirectories?
How can I ensure the icon appears consistently across all subdomains?

December 20, 2024 at 4:20 am #16532063

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you on this issue.

Can you let me know how you have added the dashicon in the first place?

Further, To debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.

So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply.
hidden link

This info is private and available to you and WPML supporters only.
Read more about this: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Note:
Backup your sites before providing the credentials or if possible provide credentials for the test site

Look forward to your reply.

Thanks

December 20, 2024 at 8:06 am #16532310

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

You were using dashicons which is official icons for WordPress admin, but since the site was using different login, the wp-admin wasn't loaded.

If you check the site without login, the issue was there even on default language.

I used the solution from here to load dashicons to front-end and it seems to be working, it's showing two icons, you can easily remove them from the dashboard.
https://stackoverflow.com/questions/50004974/dashicons-in-wordpress-frontend-wont-display

I added the following line on hidden link

	wp_enqueue_style('dashicons');

Let me know if this helps.

Thanks

December 20, 2024 at 1:25 pm #16534372

bernhardG-5

It works. In the primary menu of the subdirectories the custom link for the dashicon is doubled now. Can I simply cancel one or does it matter which one to cancel, the first or the second one?

December 23, 2024 at 4:51 am #16539259

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

You can cancel any items either the first or second.