Skip Navigation

[Resolved] Create a separate custom post page based on custom fields in a post

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to know if it was possible to assign posts from a CPT to different content templates.

Solution:

Yes this is possible as there is a content template section on the posts when editing the posts where you can select the content template that should be used for that post.

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1076488

I have a scenario where I have custom post types and I'd like to have a listing view that displays some of the post information. I've created this here: hidden link

However, I'd also like to be able to create various views based on each custom post. What I mean is I'd like to have individual post pages that contain select information based on custom fields for each post. Basically, something similar to how you get to choose what fields you want to add in the "Loop Editor".

But I want to be able to select only some fields and create an individual page (single template) for an individual custom post (rather than the archive/listings template used in the link above)

Is there a way to accomplish this with an archive/layout of some kind such that the pages are created in an archive (much in the same way WP archive pages work). Or, do I need to separately create individual posts in this case?

Basically, I want to create an archive page like this (only I want to substitute the post body/description for various custom fields, similar to what you see in the first link provided above): hidden link

Thanks,
Austin

#1076493

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

Correct me if i'm wrong, so essentially you want a listing that is prefiltered based on a custom field value correct?

Please let me know.
Thanks,
Shane

#1076503
Screen Shot 2018-08-07 at 1.15.02 PM.png

I'd like for each custom post I create to have a single page that displays certain post content. I'm guessing this would need to be something like how the typical single.php works, but instead of just the post body, I'd like to choose certain custom fields to display.

In the screenshot, it shows what my custom post type looks like. You'll see there are a couple groups of fields. I need to create a single page for each post that only shows certain custom fields based on those groups you see in the screenshot. For example, a single post page that shows the title of the post and only the "Vendor Contact Information" fields.

Alternatively, I suppose I could create a new custom post type that is essentially a duplicate of the posts, and repeat certain custom post type information in the body. But these would be much more work.

Ultimately, I'll need the ability to edit the single post view and/or create an alternative single post view. Unless, that is, something like this can be achieved by creating an archive/single post view with the Toolset plugin?

Does this explanation help?

Thanks,
Austin

#1076540

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ryan,

I believe I explained how to do this here https://toolset.com/forums/topic/custom-layout-for-wp-archive-pages-for-custom-post-type/#post-1076490

With the content template.

Thanks,
Shane