Site logo

[Support request] Crear un Single Personalizado para las entradas

Home Forums Support [Support request] Crear un Single Personalizado para las entradas

Home Forums Support Crear un Single Personalizado para las entradas

  • This topic has 1 reply, 2 voices, and was last updated 3 years ago by Fernando.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2598177
    Jonathan

    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.

    #2598770
    Fernando
    Customer Support

    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
     */

    More info here: https://www.wpbeginner.com/wp-themes/create-custom-single-post-templates-for-specific-posts-or-sections-in-wordpress/#:~:text=no%20configuration%20required.-,Manually%20Creating%20Custom%20Single%20Post%20Templates%20With%20Code,-This%20method%20is

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.