Add new custom code snippet

Telemarketing Leads gives you best benifit for you business. Now telemarketing is the best way to promote your business.
Post Reply
Habib01
Posts: 488
Joined: Tue Jan 07, 2025 4:17 am

Add new custom code snippet

Post by Habib01 »

Find page URL
Then, go to the Dashicons website and click on the icon you want to use .

When you click on an icon, the name and slug appear at the top. Now you need to copy the slug, which you will need in the next step.

Select icon dashicons
Once you’ve done that, go to the Code Snippets ” + Add Snippet page and hover your mouse over the “Add Your Custom Code (New Snippet)” box.

Then, simply click on the “+ Add-on Customize” button that appears.

On the next screen, provide a title for the snippet and select PHP Snippet in the Code Type option.

At this point, you can copy and paste the following code into the code editor:


Don't forget to change it dashicons-format-asideto the slug you copied earlier.

The code will look like this in the code editor:

Add menu icon code
Next, you need to tell WordPress where to run the code.

The admin menu icons appear in the WordPress admin area. On the same page, scroll down to the Insertion section and select “Admins Only” under the Location option.

Load code location
Finally, switch the snippet to Active and click the 'Save Snippet' button to save your changes.

WordPress will start using the icon you selected for the Publish page.

Custom icon code method
Example 2. Using the Font Awesome icon for a menu item in the WordPress admin area

The default Dashicon library has a limited set of icons. The good news is that you can use a font and pakistan telemarketing data icon library like Font Awesome, which has a much larger set of icons.
Post Reply