Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #379863

    Hello,

    I’m having trouble using the custom post type templates.

    I recently created a custom post type called “Episode” using the plugin “Types”. I created a template called “single-episode.php” by copying the contents of “single.php” and adding the title /* Template Name: Episode */. I enabled the Advanced Layout Builder using a Vimeo tutorial and everything seems good so far. The problem is that these custom posts are automatically generated by an RSS feed so there are too many to manually edit. I would like to just modify the custom template so that they are generated correctly to begin with. I was hoping you could point me to some information on how to edit the template so it doesn’t look exactly like the “single.php” post template that I copied. The main thing I would like to do is disable the featured image showing up at the top and a few other minor things..I’ve read dozens of articles and the wordpress codex on templates and CPT’s but the code doesn’t look anything like Enfold’s “single.php” code.

    I guess there are two things I would like to accomplish.
    1. – Disable the featured image icon that shows up above the post. (Only on my custom post type. Not on the normal blog posts)
    2. – Or set a default fallback image when no featured image is available.
    3. – I would like to have some content (e.g. a text link) permanently included in the custom template.

    The third one may not be possible.

    Any help is greatly appreciated,
    Chris

    #380407

    Hey Chris!

    You can add this to the file to hide the featured image.

    <style type = "text/css">
    .big-preview, .small-preview { display: none !important; }
    </style>

    For the text link you could use HTML like so.

    <a href = "URL to your page">Click me</a>
    

    Cheers!
    Elliott

    #380511

    Thanks for the help!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Editing Custom Post Type Template’ is closed to new replies.