Genesis Tip — How To Remove Post Info From A Specific Or Custom Post Type

January 10, 2012

Genesis Tip: How to remove Post Info from specific a specific/custom post type

Time and again we come across unique requirements from clients. Like, sometimes a client wants to hide date, time and admin link from specific or a custom post types. If you are using Genesis, you can use the Genesis filter ‘genesis_post_info’ to remove or hide Post Info.

To hide or remove post-info from the desired post you can place the following code in functions.php:

function custom_post_info($post_info)
	{
	global $post;
	if(get_post_type($post->ID) == 'post_type_name' )
		{
		return false;
		}
	else
		{
		return $post_info;
		}
	}
add_filter('genesis_post_info', 'custom_post_info '); 

In the above code you just need to replace ‘post_type_name’ with your post type. That’s all for hiding date, time and admin link.

 

Join 37,807 others and get free tutorials & tips on design & development using Wordpress on, Thesis & Genesis!

Need help with Wordpress, Thesis or Genesis?

Are you a designer or a developer looking for a hand with Wordpress, Thesis or Genesis? Or perhaps want to save time with a project? Get in touch and let's get the ball rolling! Check out our Thesis development, PSD to Thesis & other services.

{ 2 comments on Genesis Tip — How To Remove Post Info From A Specific Or Custom Post Type… read them below or add one }

paul January 26, 2012 at 2:43 am

thanks, just what I was looking for!

Seth May 5, 2012 at 12:31 am

Just gave this a try and it removes the post info from both the CPT as well as normal blog posts. Is there something missing?

Comment on Genesis Tip — How To Remove Post Info From A Specific Or Custom Post Type

You can add images to your comment by clicking here.

Previous post:

Next post:

X

Wordpress, Thesis, Genesis tutorials from Binary Turf — one tutorial a day. Subscribe & sharpen your web design skills.

Name:

Email:

We respect your email privacy.