• Resolved Paul Buijs

    (@paulbuijs)


    Hi,

    Is there a way to limit this plugin to only being use for one custom post type?

    I have a plugin that creates job listings that uses the standard featured image to create a company logo. But for sharing purposes I’d rather show a photo. Hence your plugin but I don’t need to for other post types.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • This plugin is great for just custom post types!

    In the code you add to your functions.php that he has in the installation instructions, just change this part:
    'post_type' => array( 'page' ),
    remove ‘page’ and set up the post type slug for the posts you want it active on.

    Then use the display functions to retrieve the new thumbnail type you create inside the loop on the template that is for that post type.
    kdmfi_get_the_featured_image( $image_id, $size, $post_id );

    Cheers!

    Thread Starter Paul Buijs

    (@paulbuijs)

    Hi Avant,

    Thanks for that. Not sure what exactly to put into my child theme’s funtions.php.

    The first part I think I understand I just need to find out what the slug is for the job posts.

    But the second part I am lost. What am I putting where? What gets replaced?

    Thanks!

    Plugin Author Marcus Kober

    (@marcuskober)

    Hi there,

    the second part you place where the image should show up. It depends on the theme you are using, where you have to place the code. For expample: should the featured image you are adding displayed in the header of the page? Then header.php might be the right place.

    This plugin is mainly written for theme developers, it offers no convenient ways to include images, all has to be done in code. BUT. I’m currently working on a new version (or new plugin – I’m unclear in that) that offers more convenience for users with less experience in theme development.

    Regards,
    Marcus

    Plugin Author Marcus Kober

    (@marcuskober)

    @avant-5

    Thanks for your help here and the nice review! ??

    Cheers,
    Marcus

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Limit use to custom post type’ is closed to new replies.