Reply To: How can I do custom template for single posts?

#8973
Selahattin Uzun
Guest

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

🙂