This page may contain affiliate links. Please read our disclaimer for more information.

Editing Post Info in Genesis Child Theme

January 23, 2013

The Post Info line, is usually found below the title of your blog post. Here is a screenshot of how it looks on our blog.

post-info

It displays the date the post was published, the author name, a link to the comments, and a link to edit the post (only visible when logged in).

I am going to show you how to remove the date from this line.

With Genesis you have two options, edit your functions.php file or use a Genesis plugin.

1. Editing Your Child Themes functions.php File


/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if ( !is_page() ) {
    $post_info = '[ post_date ] by [ post_author_posts_link ] [ post_comments ] [ post_edit ]';
    return $post_info;
}}

/** Code courtesy of StudioPress Code Snippets */

We’re only going to edit one line of the above code:


$post_info = '[ post_date ] by [ post_author_posts_link ] [ post_comments ] [ post_edit ]';

You’ll need to delete the [ post_date ] shortcode.

(Note: These shortcodes are Genesis specific (list of Genesis shortcodes). Meaning they don’t work in just any WordPress theme.)

My edited line looks like this:


$post_info = 'By [ post_author_posts_link ] [ post_comments ] [ post_edit ]';

Save your functions.php file and you’re done.

2. Using a Genesis Plugin

Install the Genesis Simple Edits plugin. This plugin only works with the Genesis Framework.

Once the plugin is installed and activated, you’ll need to make one change to the plugin Settings.

post-info-plugin

You’ll need to delete the [ post_date ] shortcode.

Your edited settings look like this:

post-info-plugin-edit

Then Save Settings, and you’re done.

NOTE: If you have the Genesis Simple Edits plugin activated, and try to edit the Post Info by editing your functions.php file, your changes will not render, you will have to make the changes in the plugin settings, or deactivate the plugin.

Chris

Article by Chris Eggleston

Husband. Father to 4. Grandpa to 2. Gravity Forms enthusiast. As the owner of WP Mantis, I’m on a mission to simplify the WordPress experience for site owners. I also try to bring a unique perspective to the Gravity Forms community at gravityranger.com.

0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
ceah
ceah
10 years ago

Hi,

How would you remove the date and then place it in a different location from the author name?