Public Ticket #3

Can't set up adapted template for personalized post type

Joseph L. Replied 2 months, 10 days ago on May 24th at 3:56pm

default avatar

Joseph L.

supervisor_account Staff

Hi, Carlos

You may use the following link as guidelines on how to correctly name the file to be used by a custom post type.

https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/

Cheers

Carlos started a discussion May 21st at 3:02pm

default avatar

Carlos

loyalty 1 Ticket

Hi, 

I am readapting my site to the new theme but facing problems when I try to set up a template for a specific post type. I managed to create alternative templates for pages, but don't know how to proceed with other post types. I have tryied by adapting the template-parts/content.php and stored an alternative content-seccion.php file in the same directory of the child theme as "seccion" is the post type I want to re-style, but nothing happens.

Is there something I am missing?

(I saw that the index.php calls for post_format() in get_template_part( 'template-parts/content', 'get_post_format()' ), but even changing this to 'get_post_type()' nothing happens.

Thanks 

Carlos

Advertisement

Ticket Details

Friendly Reminder

Support Includes the Following:
  • checkAnswer related questions
  • checkRelated technical questions
  • checkAssistance with reported bugs and issues
  • checkHelp recommended 3rd party plugins
Not Included:
  • × Customization Services
  • × Installation Services
  • × 3rd Party Plugins Customisations