Changing markup of Featured Posts Title using GFPC Plugin

Another small tips for Genesis Featured Posts Combo users. Using following script you can alter the H2 tag of Featured Posts title:

add_filter( 'gfpc_do_post_title_gfpc-widget-3', 'gfpc_change_post_title_markup', 10, 2 );
function gfpc_change_post_title_markup( $title, $instance ) {
  if( empty( $title ) )
  $title = str_replace( '<h2', '<h4', $title );  
  $title = str_replace( '</h2>', '</h4>', $title );
  return $title;

gfpc-widget-3 is my GFPC widget ID. You will replace this with your widget ID.

Attention: Above code is not required from v2.4. I already added the new field for title wrap. So you can easily edit the markup from appearance->widgets page.

Share This Article

C. Paul

Creating Genesis Framework related themes, plugins, articles and troubleshooting the issues. Also I am doing the freelance work for clients.

Subscribe Membership Plan ($9.99/mo)

  • Get full access to all premium tutorials
  • Get Support for the posted content
  • Request for specific how-to tutorials
  • Cancel the subscription at anytime

Reader Interactions

3 Discussion to This Post

  1. Neil MacLean says

    Is it easy to remove the title at the top of the widget?
    Universally, not just for specific widget ID?


Leave A Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.