Genesis Hooks

Community Forums Forums General Discussion Genesis Hooks

This topic is: not resolved


This topic contains 3 replies, has 3 voices, and was last updated by  slydawgg 1 year, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #57993

    Post count: 13

    I see that there is an area to add something to the genesis_after_post_content but why does it show on the page if it is for Post Content? Is there a way to just have the content that I want added here to just the posts and not pages as well?

    Post count: 423

    Hi there,

    In WordPress vernacular, both pages and posts are a considered a “post type”, so the genesis_after_post_content hook isn’t reserved just for posts. (Here’s more info in nerd terms).

    To do what you’re wanting, tou’ll need to use a conditional statement along with that hook to only display on pages. Here’s an intro tutorial to conditional statements. You’ll want to use the is_single() check to only show you’re info on posts.

    So you might have a conditional that looks like:

    add_action ( 'genesis_after_post_content', 'add_my_stuff' );
    function add_my_stuff() {
        if ( ! is_single )
        echo 'add your text here';


    Have you been helped in this forum? Pay it forward and answer someone else’s question. I bet you’ll know the answer to at least one question. :)

    I host a weekly Genesis-focused podcast called Genesis Office Hours. I tweet @cdils.


    Post count: 13



    Post count: 20

    @cdils – I’ve tried your method but cannot seem to make it do what I am trying to do. Hopefully you have an idea regarding this issue:

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.