Archived topic
Crear un Single Personalizado para las entradas
1 reply · Started by Jonathan on April 5, 2023
Hola quiero crear un single personalizado y este establecerlo para determinadas entradas.
He creado al mismo nivel de Single.php un archivo llamado Single-personalizado.php
El codigo del archivo Single-personalizado.php es el siguiente:
<?php
/**
* Template Name: Mi Entrada Personalizada
*
* Descripción: Esta es una plantilla personalizada para la visualización de una entrada específica.
*/
Sin embargo no puedo visualizar los atributos de entrada de este archivo.
¿Como puedo resolverlo? Gracias.
--------------------------------------- Traslate -----------------
Hello I want to create a custom single and this set it for certain inputs.
I have created at the same level of Single.php a file called Single-customized.php
The code of the Single-personalized.php file is the following:
<?php
/**
* Template Name: My Custom Post
*
* Description: This is a custom template for displaying a specific post.
*/
However I can't display it in the post attributes.
How can I solve it? Thank you.
Hi Jonathan,
Here's the Template Hierarchy showing what file name structure is needed for a template to run: https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
As for a template that can be selected in the Post Settings, you may need to alter your file so that it starts as such:
<?php
/*
* Template Name: My Custom Post
* Template Post Type: post
*/