• 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

How To Add Content After Single Post Titles In Genesis

This post will give you several options you can choose from to display any type of content after all single posts titles.

Note: This PHP code only works with Genesis child themes running HTML 5. Please copy ALL the code and paste it at the end of your child themes functions.php file using a text editor like Notepad++

After Title But Before Entry Meta

function after_title_text() {
if(is_single() ) {
    echo '<h4 class="single-title">Add content after your titles but before your content here</h4>';
}}
add_action('genesis_entry_header', 'after_title_text', 11 );

before post info

After Title & After Entry Meta

function after_title_text() {
if(is_single() ) {
    echo '<div class="single-title">Add content after your titles but before your content here</div>';
}}
add_action('genesis_entry_header', 'after_title_text', 11 );

after post info

Add Text After Entry Titles

Add Widget After Entry Title

genesis_register_sidebar( array(
	'id'          => 'after-title',
	'name'        => __( 'After Title', 'theme' ),
	'description' => __( 'This is the after title widget area.', 'theme' ),
) );
add_action('genesis_entry_header', 'after_title_widget', 11 );
function after_title_widget() {
	if ( is_singular( 'post' ) )
		genesis_widget_area( 'after-title', array(
			'before' => '<div class="after-title widget-area">',
			'after'  => '</div>',
		) );

}

Simply change the 3rd parameter from 11 to 12 if you want to output the widget content after the entry meta (post info).

Widget After Entry Title For Posts In 1 Category

Replace your-category-slug with the slug or I.D for your category.

Related Posts

  • Add Affiliate Disclosure After Single Post Entry Titles In Genesis
  • Add Text After Title Or Before Content In Any Theme

Reader Interactions

Comments

  1. Mark Fayard says

    August 6, 2014 at 4:57 am

    Hi Brad, would this work for adding content after Featured Widget Titles? For instance I’d like View More to appear after my Featured Posts titles on the homepage only.

    Thank you for your tutorials and time devoted to the Genesis developer community – much appreciated!

    Log in to Reply
    • Brad Dalton says

      August 6, 2014 at 5:15 am

      Hello Mark

      I assume you’re referring to the Genesis Featured Posts widget which is coded separately.

      What you can do is create you own featured posts widget and modify the code.

      If you want to filter the widgets title, you can add the read more link after the title ( Code not written at this point in time )

      $args['before_title'] . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $args['after_title'];

      Thanks

      Log in to Reply
      • Mark Fayard says

        August 6, 2014 at 8:43 pm

        Thank you Brad. If it’s not something I can figure out, is it something I can hire you for? If so are you available and what is your estimated fee.

        In the topmost Sandbox Featured Widget I’ve used the Widget title (View More) in addition to displaying the title post. This is a hack though and requires separate CSS for both titles.

        Log in to Reply
        • Brad Dalton says

          August 7, 2014 at 12:28 am

          Please use the contact form if you want to hire me to fix this for you. Thanks

          Log in to Reply
  2. Vadim says

    January 26, 2014 at 10:00 pm

    Hi Brad,

    If I read it right, the text is the same for all posts. Then, I can’t think of something useful to put there. However, your tutorial pushed me in the direction of the post byline that I wanted to implement for a while.

    I used Advanced Custom Fields plugin (very well documented) and hooked the custom field output to Genesis.But I gather a skilled developer can create everything manually.

    Thanks for the idea!
    Vadim

    Log in to Reply
    • Brad Dalton says

      January 27, 2014 at 4:10 am

      Great idea. This will enable you to add unique content after all single post titles.

      Log in to Reply
    • amit says

      February 7, 2014 at 7:11 pm

      How did you hooked custom field output to Genesis ?

      Log in to Reply
      • Brad Dalton says

        February 7, 2014 at 7:40 pm

        This post has nothing to do with custom fields however i have already written several posts which include using custom fields with genesis so you can find the code to see how its done which is very basic.

        Log in to Reply
  3. Mike says

    January 13, 2014 at 4:45 pm

    Thank you SO much Brad!!! (once again)

    – Mike

    Log in to Reply
    • Brad Dalton says

      January 14, 2014 at 6:32 am

      No problem Mike. Always happy to help.

      Log in to Reply

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.