Skip Navigation

[Resuelto] cpt page attributes not showing template, only order

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
Created a new post type, "projects" and checked "Page Attributes" in the checkbox, but it only shows me "order", whereas in other pages I can see "template". I need this because i want to cpt to be full page template.

Solution:
For this you need to have at least one custom php page template and define your CPT in that php template file.

- Edit your CPT using in Types >> Enable "Page Attributes" option & save it.
- Then Edit your php page template file >> look for this section at the beginning of the php template file:

<?php
/**
 * Template Name: About Template 
 * Template Post Type: post, page, event, student

==> In the line #4 you can see I have added event and student CPT slugs, so that the Page Template dropdown appears in that CPT's Edit post screen.

As an example you can see my sample "About Page" template file here:
https://drive.google.com/file/d/0B5EmJQ1qcuyqUzViRDI1TThEX0U/view?usp=sharing

OR alternatively, you can use this plugin as well for enabling Custom Post Type Page Template:
https://wordpress.org/plugins/custom-post-type-page-template/

This support ticket is created hace 7 años, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Etiquetado: 

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por Ido Angel hace 7 años, 2 meses.

Asistido por: Noman.

Autor
Mensajes
#569959

hey,
i've created a new post type, "projects". i've checked "Page Attributes" in the checkbox, but it only shows me "order", whereas in other pages i can see "template". i need this because i want to cpt to be fullpage template.
i've tried changing this with css, but since it contains a responsive slider in it it doesn't work.
any help appreciated.
thanks!
ido

#569977

Noman
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Karachi (GMT+05:00)

Hi Ido,

Thank you for reaching out to us. For this you need to have at least one custom php page template and define your CPT in that php template file.

- Edit your CPT using in Types >> Enable "Page Attributes" option & save it.
- Then Edit your php page template file >> look for this section at the beginning of the php template file:

<?php
/**
 * Template Name: About Template 
 * Template Post Type: post, page, event, student

==> In the line #4 you can see I have added event and student CPT slugs, so that the Page Template dropdown appears in that CPT's Edit post screen.

As an example you can see my sample "About Page" template file here:
enlace oculto

OR alternatively, you can use this plugin as well for enabling Custom Post Type Page Template:
https://wordpress.org/plugins/custom-post-type-page-template/

I hope it helps, Thank you

#569989

perfect. thanks!