Custom Post Type and custom fields

Posted in: Newspaper
Post count: 11

I have created a custom post type (Ideas) and there are three custom fields associated with it.

I would like to
a) display the CPT using template 12 of the post templates
b) display the 3 custom fields above the post content

I don’t need the TD Composer to work with the CPTs, and can add the 3 custom fields manually into a template. But where?

What is the best way to do that?

Thanks,

Post count: 20688

Hi,

Before the 9.7 update is was possible to use one of the theme single templates for CPTs, in a child theme, and also customize them if needed. But after the latest updates when most of the theme files were moved in the composer plugin, that is not possible anymore. They will use the default post template, these are the files – http://prntscr.com/o474xuhttp://prntscr.com/o4752p

Having them displayed with a different post template is not possible with theme settings at the moment. Maybe an option or a new solution will be provided in the future, can’t say for sure. Sorry for the inconvenience.

Thanks

Post count: 11

That’s unfortunate, and a real downside to the theme.

But surely I can adapt the single.php file to default to template 12 instead? I would be ok if template 12 was the ONLY template available to me.

Can you suggest the code to do this?

Post count: 35449

Hi,

If you have the last version ( v9.7.x ) of the Newspaper theme you can not longer build template according to our documentation https://forum.tagdiv.com/custom-post-type-support/ , if you have a prev version ( for example v9.6.x ) these implementation will still work.
The code for template 12 in the last version of the theme can be found in wp-content/plugins/td-composer/legacy/Newspaper/parts/single/single_template_12.php

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.