WordPress.org

Ready to get started?Download WordPress

Forums

Highwind
[resolved] Remove featured image from custom post type. (2 posts)

  1. AJD
    Member
    Posted 6 months ago #

    When I make an event post the featured image is duplicated.

    I am using the Events Manager plugin which has its own built in handling of featured images for events.

    I would like to remove the featured image from all 'event' post type pages.

    I don't want to use CSS.

    Here is what I tried, but it doesn't work:

    add_action ('init', 'remove_highwind_featured_image');
    function remove_highwind_featured_image(){
    if ( 'event' == get_post_type() ){
     remove_action( 'highwind_content_entry_top', 'highwind_featured_image', 20 );
    }

    Any ideas?
    Thanks!

  2. AJD
    Member
    Posted 6 months ago #

    I figured it out, was adding my new function at the wrong place:

    add_action ('highwind_content_entry_top', 'remove_highwind_featured_image');
    function remove_highwind_featured_image(){
    if ( 'event' == get_post_type() ){
     remove_action( 'highwind_content_entry_top', 'highwind_featured_image', 20 );
    }

Reply

You must log in to post.

About this Theme

About this Topic