Support » Plugin: Custom Post Type UI » Using Page template for custom post type

  • Resolved luthermax

    (@luthermax)


    Hi there,

    Is it possible to get posts in the custom post type to use the Page template instead of the Post template?

    Also, if the theme has some custom options / settings for posts and pages, can these be made accessible to the custom post type?

    Thanks!
    Luther

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Typically, the archives for a given post type use archive.php or archive-$post_type_slug.php files. However, I think you mean the template dropdown like you get with pages, where you can specify a very specific template file to use. For that I’d recommend checking out https://make.wordpress.org/core/2016/11/03/post-type-templates-in-4-7/ for how to set that up.

    For the second part, do you mean like customized metaboxes or something from Advanced Custom Fields? If the first part, you’ll need to customize the code to be loaded for the given post types, and if the ACF setup, then the fields logic for display will need to be updated to match.

    Thread Starter luthermax

    (@luthermax)

    Hi Michael,

    Thanks for your reply.

    You were correct, I meant the template for the individual posts – and the info on the link you provided worked great thanks!

    For the second part, yes, I mean custom meta boxes provided by the theme, e.g.:
    Screenshot

    The template I’m using for the individual posts looks for the parameters set in this meta box. Is there a way I can get that to show up for the custom post type posts..?

    Thanks,
    Luther

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    You’ll need to locate and edit settings appropriately where those metaboxes are being created at, to include them in your post types. That’s not something we can handle within CPTUI itself.

    Thread Starter luthermax

    (@luthermax)

    Ok thanks, I’ll have a look in the theme files or reach out to the developer

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Sounds good. Welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Page template for custom post type’ is closed to new replies.