• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Add Clickable Icon Linked With Post Title

The code snippets in this tutorial enable you to add a icon before or after the entry title on any archive pages and single posts/pages.

icon-before-title

In this case, the icons used are dashicons which are already registered in WordPress by default so you only need to load them using the following code in your functions file:

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

Check your child themes functions file first because your theme may already load dashicons meaning you won’t need to add the above code.

Once you’ve loaded the icons, you can then add them to your entry titles using a variety of methods.

You can either:

  1. Add the same icon to all entry titles or
  2. Add a unique icon to every entry title

The code for all solutions is included for members below:

Register for full access

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.