1,105,427 Community Members

Remove excerpt for custom post type on home page

Member Avatar
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
pritaeas
mod_pritaeas
11,317 posts since Jul 2006
Reputation Points: 1,420 [?]
Q&As Helped to Solve: 1,835 [?]
Skill Endorsements: 156 [?]
Moderator
Featured
Sponsor
 
0
 

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

Member Avatar
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Sorry - NOT supported.

Member Avatar
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
blocblue
Practically a Posting Shark
828 posts since Jan 2008
Reputation Points: 238 [?]
Q&As Helped to Solve: 162 [?]
Skill Endorsements: 16 [?]
Featured
 
0
 

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

Member Avatar
Lynne Good
Newbie Poster
11 posts since Sep 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Thank you! I got it!

Member Avatar
blocblue
Practically a Posting Shark
828 posts since Jan 2008
Reputation Points: 238 [?]
Q&As Helped to Solve: 162 [?]
Skill Endorsements: 16 [?]
Featured
 
0
 

Great. Please mark as solved.

Member Avatar
picassokaka
Newbie Poster
4 posts since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
-1
 

Thanks share this mate

Question Answered as of 1 Year Ago by blocblue, pritaeas and picassokaka
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: