How can I do custom template for single posts?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8971 Reply

    Selahattin Uzun

    Hello again,
    I am using “0 sidebar layout” as default layout with frontier and elementor pro.
    I want to make custom single post template in frontier with or without elementor.
    For example
    I want to Single Post Template with 3 colums without any widget.
    Basically,
    Is it possible to make template that could be used as default single post layout with 3 colums without plugin?
    or
    How can I do this with plugin?
    Many thanks for your helping.

    #8972

    Ron
    Keymaster

    You can copy/make your own page template then rename the file as singular.php
    It would then be the default template used for single posts.

    #8973

    Selahattin Uzun

    you know, I want to use no sidebar as deafult layout on the site

    at the same time, I want “2 sidebar, full width” layout for single posts

    I tried to make what you said

    my goal is to try, left sidebar + single post content + right sidebar

    I registered the template save as “special-post-template.php”
    and sent it to the frontier folder

    The template content is as follows:

    <?php
    /*
    Template Name: Special Post Template
    Template Post Type: post
    */
    ?>

    <?php get_header(); ?>

    <?php get_sidebar( ‘left’ ); ?>

    <?php
    the_post();
    get_template_part( ‘loop’, ‘single’ );
    ?>

    <?php get_sidebar( ‘right’ ); ?>

    <?php get_footer(); ?>

    but, the view on the page has not been side by side
    I was not able to prevent the following page view

    left sidebar
    single post content
    right sidebar.

    it is very difficult for me, which is very easy for you

    but it’s quite exciting to learn these steps for me

    I’m trying to understand the basically

    If the explanation will be long and it will take a lot of time for you, or if it is a very complicated situation,

    Please do not respond

    thank you very much for your understanding

    🙂

    #8974

    Ron
    Keymaster

    Try this:
    Rename the file you created “special-post-template.php” to “singular.php”
    Then add this to the customizer -> additional css:

    #main {
        display: flex;
    }
    
    #main #content {
        order: 2;
    }
    
    #main #sidebar-left {
        order: 1;
    }
    
    #main #sidebar-right {
        order: 3;
    }

    Caution: Just in case you don’t know. If you’re not using a child theme your changes will be deleted when the theme is updated.

    #8977

    Selahattin Uzun

    Hello
    I added and it is ok.
    Yes. I know I am using direct frontier theme instead of child theme.
    I will back to child theme again.
    I think,
    WordPress and frontier installed on my site damaged due to my trials since beginning.
    And
    My site need to reconstruction with a clean installation in same conditions.
    But
    I needed to these steps to learn and understand a few basic knowledge like these.
    I will to reconsruction my site on nearest time.
    I am so sorry for my english.
    I know it is not enough.
    İt is really that The Frontier theme is great, great, great theme
    And
    You are very special person for Wordpres and Frontier Users.
    Thank you very much for your efforts for Frontier Theme and users.
    Many thanks for your helping again.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: How can I do custom template for single posts?
Your information: