We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,194 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Remove excerpt for custom post type on home page

I have registered new custom post types and used this filter to add to my blog homepage

add_filter( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query ) {
    if ( is_home() && $query->is_main_query())
        $query->set( 'post_type', array( 'post', 'kicksimage3', 'kicksimage5', 'kicksvideo', 'kicksstatus' ) );
    return $query;
}

Now that it is showing on my homepage - I want to remove the excerpt so that only the featured images show. I am using the Genesis framework and the child theme is configured to show featured images and the post excerpts - however I would like to remove the excerpt for only the custom post types I have created.
Any help is appreciated!

4
Contributors
8
Replies
23 Hours
Discussion Span
5 Months Ago
Last Updated
9
Views
Question
Answered
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Haven't heard Genesis mentioned here yet. Did you try their forums?

pritaeas
Posting Prodigy
Moderator
9,293 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,462
Skill Endorsements: 86

Yes - but custom post types are something supported.
Is there a way to remove the excerpt no matter what theme is used?

Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Sorry - NOT supported.

Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

My goal is to only show the featured image with no content, excerpt, title - anything. Is that possible?

Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Just remove the_excerpt or the_content tag from the loop outputting the custom posts in the template.

blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12

Thank you! I got it!

Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Great. Please mark as solved.

blocblue
Practically a Posting Shark
837 posts since Jan 2008
Reputation Points: 272
Solved Threads: 161
Skill Endorsements: 12

Thanks share this mate

picassokaka
Newbie Poster
4 posts since Dec 2012
Reputation Points: 0
Solved Threads: 2
Skill Endorsements: 0
Question Answered as of 5 Months Ago by blocblue, pritaeas and picassokaka

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0897 seconds using 2.72MB