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

WP SITES

2670

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Tutorial Requests
  • Contact
  • Videos
  • Tags
  • Log in

Premium Member? - Request custom code

Conditionally Wrap Genesis Featured Posts Widget Title In Span Tags

This code snippet enables you to add a span class to the Genesis Featured Posts widget title. You can also add the span conditionally so its only added on specific pages or conditionals.

In this case, its only added on the front page.

Here’s the default HTML output showing the h3 tag :

You can see the span tag added in the following screenshot :

You could also wrap the widget title in span tags like this without removing or modifying the default HTML tags :

Register or login to access the code :

Register for full access

Genesis Featured Posts

Reader Interactions

Comments

  1. Debbie Hastings says

    April 26, 2018 at 5:28 am

    AWESOME! Thanks!!

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Brad Dalton Specializes In Genesis child theme customization & code modification. Read More…

Learn PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems