Support » Plugin: Featured Image in Content » Apply this plugin only in posts

  • kouts34

    (@kouts34)


    Hello,

    Is it possible to apply this plugin only in the posts and not, for example in products?

    Kind regards,
    George

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    It should be relatively straightforward to implement that functionality in code by forking the plugin. You could add a post type check to line 33 of the plugin with something like this:

    
    if ( is_singular() && has_post_thumbnail() && 'post' === get_post_type() ) {
    

    Then rename the plugin to fork it so that any updates won’t overwrite it.

    Dear Nick,

    Thank you very much for your help! To be honest, i have copied your plugin’s code to the theme’s function.php to avoid replacing the customization when the plugin is updated, and worked flawless!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Apply this plugin only in posts’ is closed to new replies.