loading
I currently have availability
logo

Hi, I'mKevin Shoffner

Remove everything except Post Title on Category Pages – Genesis

You may notice in Genesis when you load a category page (domain.com/category/awesome) you will see a listing of all of your Posts with featured images, content, and probably some other meta tag stuff.  What if you want to remove/hide everything except one or two particular things?

Here is one way to do it

Open your functions.php file and add this (I recommend the bottom of the file)
add_action('genesis_before','remove_unwanted_actions');
function remove_unwanted_actions() {
if ( is_category()) { // <--- you could change, more about that below
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
remove_action( 'genesis_post_content', 'genesis_do_post_content' );
}
}

This basically says:

Hey Genesis, I want to do something different than your normal awesome hooks; instead on Category pages, I don’t want you to display Post Information, Meta Data, or Post Content.  I just want the Post Title to show up.

Genesis will obey you because you are the master of your own domain.

Small adjustments to the above code:

is_category() = for Category Post Pages
is_single() = for individual Posts
is_page() = for Pages

 

I’ve also created a tutorial on how to display featured images on Category Post Pages also, so take a look over here.

Leave a Reply

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

%d bloggers like this: