Multiple Post Thumbnails
[resolved] Limit to specific category (2 posts)

  1. helgatheviking
    Posted 2 years ago #

    Is it possible to limit the display of the second post thumbnail metabox to a specific post taxonomy?


  2. Chris Scott
    Plugin Author

    Posted 2 years ago #

    Something I had been looking at a while back for another use case was adding a filter when the metabox is added which would allow returning false to it to prevent the metabox from being added. Something like this in MultiPostThumbnails::add_metabox():

    if ( apply_filters( 'mpt_add_metabox', true, $post_type, $post ) ) {
    // add_metabox code...

    You could use the $post object passed in to determine if you want it displayed for that post.

    Would this work?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple Post Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.