Loading...

Page / Post Templates

Using the templates for pages and posts is easy. Select the template in backend on the right side in the page/post edit screen in Page Attributes > Template or Post Attributes > Template. If you want to use a specific one for example page-sidebar-left.php as your default one, simply copy it to your child-theme and rename it to page.php

There are 6 templates for pages and 4 for posts.

Default – Page / Post

Shows the sidebar on the right side when sidebar is active. If there is no widget in the sidebar, there will be white space.

Sidebar left – Page / Post

Shows the sidebar on the left. If there is no widget in the sidebar, there will be white space.

No sidebar – Page / Post

No sidebar is displayed. The content is displayed across the entire width of the container.

Full width image – Page / Post

Shows the featured image as a background image. If there is no image, the background is dark. No sidebar is displayed.

Blank with container – Page

Does not show a heading of the page or featured image and no sidebar, only the content wrapped in the container. This is the perfect template to create beautiful landing pages with a pagebuilder like site origin. These can stretch sections across the entire width of the page and in turn display their content in the container. If you prefer to write HTML, you can also add the class width-100 to your div. The content is then displayed in full screen width beyond the container. Read Width & Height Classes for more information.

Blank without container – Page

Shows only the content without a container.  Best choice if you prefer to write your landing pages in HTML.

24 Comments on “Page / Post Templates”

  • varun sharma

    says:

    Please tell me how to customize shop page and product page template in your theme and also tell me if i want to change any page template how to do?

    • Basti

      says:

      Hi Varun,

      this are 2 different things.

      As described in the article above, page and post templates can be selected in backend in Quick edit https://prnt.sc/10x3ck1 or post/page edit screen https://prnt.sc/10x3d6k. To create a custom store frontpage, create a page and choose “Blank with container” or “Blank without container”, so you have a blank site. Fill site with content and use WooCommerce shortcodes https://docs.woocommerce.com/document/woocommerce-shortcodes/ to display products or use Gutenberg blocks https://docs.woocommerce.com/document/woocommerce-blocks/. You can also use https://bootscore.me/plugins/bs-product-slider/ and/or https://bootscore.me/plugins/bs-isotope/ to display products. Then go in Backend Settings > Reading > choose A static page > Homepage: select your page. https://prnt.sc/10x3jkp Now your page is the frontpage.

      Customizing the product page is different. Please read here https://docs.woocommerce.com/document/template-structure/ how that works exactly. If you want to edit product page template, go in your WordPress installation open the folder wp-content/plugins/woocommerce/templates/single-product/. There are all files which are needed for the single product page. For example you want to edit price.php. Copy that file and create in your child-theme folder woocommerce/single-product/ and paste file there. Now edit this file in your child-theme.

      Hope that helps

      • varun sharma

        says:

        But I may not change the template from the quick edit. And I do not want a sidebar in any page in your bootcommerce theme , just want a left in the shop page, so how do I do this?

        • Basti

          says:

          WooCommerce uses the default page.php for shop pages.

          1. Copy page-sidebar-left.php and paste it in child-theme
          2. Rename it to page.php

          Now all pages should have the sidebar on the left by default, also the shop page.

          3. Go in Backend > Pages and select for all pages where you do not want to show a sidebar the page template “No Sidebar” in Quick Edit screen https://prnt.sc/10z62oi

          You can also use a plugin to hide or show sidebar widgets on specific pages https://wordpress.org/plugins/widget-context/

  • varun sharma

    says:

    how to add template for blog and single blog in bootcommerce theme

  • varun sharma

    says:

    also iam not able to overridden the mini cart file of cart please help

    • Basti

      says:

      Path to mini-cart.php in child must be exactly the same like in parent theme your-theme/woocommerce/cart/mini-cart.php

      • varun sharma

        says:

        please help im unable to make any change in mini-cart.php file please tell me what i do now and please tell me how to add increment decrement quantity button in mini cart

        • Basti

          says:

          Hello Varun,

          yes, I will help. But it is not possible to help without having a link to your project. It’s very confusing because you need help with 10 things at one time. Please post a link to your project and I will help step-by-step.

  • varun sharma

    says:

    Hii Iam not able to change my page template with no sidebar and my shop template to left sidebar please help me how to do in bootcommerce theme and also i want blog templates single blog and blog both how i add these templates in my bootcommerce theme please help me

    • Basti

      says:

      This are all different things. To avoid confusion let’s break it down to one and solve that, the page and shop template. Please share a site link to your shop page where you want to have the sidebar on the left and a link to a page where you want to have no sidebar.

  • David

    says:

    This may be a simple question, but how does one make use of the bootstrap components on pages and posts in a clean way that doesn’t conflict with the built-in wordpress editors and the block editor. For example, how did you design the Bootscore homepage? Does it use the block editor at all? Is it a “Custom HTML block”? Do you ever use the block editor for anything? There seems to be a lot of redundancy between Bootstrap and WordPress blocks, for example the column layouts.

    Sorry, I’m very familiar with HTML,CSS, JS, as well as Bootstrap, but my WordPress knowledge is where I lack expertise. The relationship between the theme’s Bootstrap components and WordPress’s Block components have me confused (ie buttons, columns, etc).

    • Basti

      says:

      Hello David,

      Gutenberg Blocks are not using Bootstrap classes. Adding Bootstrap there will open Pandora’s box, because WordPress develop this blocks very fast. There are plugins available for that, for example this https://wordpress.org/plugins/wp-bootstrap-blocks/ . Maybe in future I will add it to blocks too.

      However, I always and only use the Custom HTML block with this https://bootscore.me/theme/page-blank-without-container/ page template and simple use Bootstrap classes in HTML to create landing pages.

      Here on the frontpage, each section has an own HTML block. The height class https://bootscore.me/documentation/width-height-classes/ and plugin https://bootscore.me/plugins/bs-animate-on-scroll/ is used to design and animate content. Plugin post slider is insert via shortcode in HTML.

      If I want to use another block, for example a gallery, then I wrap the block in HTML blocks. For example:

      HTML Block (open div)
      Gallery Block
      HTML Block (close div)

      So, using HTML instead of predefined blocks give you the completey freedom to design whatever you want.

      Hope that helps.

      • David

        says:

        Ok, that makes a lot of sense! Thank you for clarifying. You’ve created a really impressive theme here – thank you for your efforts!

        For what it’s worth, I do think extending Bootscore to bring bootstrap components to Gutenberg blocks would add a lot of value and eliminate duplicated features and css in the two frameworks. I think it would empower content writers, who may not feel comfortable jumping into the HTML blocks, to design and edit pages when working with themes built on top of Bootscore. I agree, it does seem like a big undertaking though. In a way, you’ve already started with the Responsive Video and Gallery Lightbox plugins you created! 🙂

        • Basti

          says:

          Thank you.
          You’re right, Gutenberg should be supported. But this is definitely a bigger thing and has to be well thought out for it to be good. I will keep it in mind. Maybe it’s better to make a plugin out of it instead of integrating it into the theme. We will see.

  • Arie Olivier

    says:

    Hi Basti. I’m enjoying your theme. Great work! I have duplicated the page-full-width-image.php in my child theme and made some changes, but my template does not override the parent template. I know I can simply rename my template, but I don’t more templates. How can I make the child template override the parent one? Thanks

    • Basti

      says:

      Hello Arie,

      thank you very much. What do you want to do?

      Using your modified as default template in child? Just rename it to page.php.

      If you have stored as page-full-width-image.php in child you can select template in backend, it should override parent template.

      Does that help?

      If not, you can send me admin details through the contact form in the footer.

      Basti

      • Arie Olivier

        says:

        I have stored my page-full-width-image.php in my child theme and selected the template in backend, it doesn’t override the parent template. I don’t have an online version yet, only local. Does it perhaps have something to do with how the parent theme includes the template files?

        • Basti

          says:

          Hmm, usually that works fine. Please rename it in page.php, just for testing. But of course I cannot say or fix something on your local computer.

          You can try to rename the template name in files header. If this new name is not visible in the backend then the path to file is wrong. Is your page-full-width-image.php stored in child themes root folder?

  • Arie Olivier

    says:

    Basti sorry. I was working on a post (not a page), and assumed page-full-width-image.php was used for posts and pages… Editing single-full-width-image.php in my child theme worked. Sorry to waste your time.

  • marshall reyher

    says:

    Hi Basti, I have set the reading WP settings to make my blog the page to display posts, and published a test post. I am using the default template in the bootcommerce child theme. No matter what I do, I can’t get the post excerpt to show up on the blog page. Do you have any ideas what could be happening?

    Thanks,
    Marshall

    • Basti

      says:

      Hi Marshall,

      I need a link to your site to check that.

      Basti

Leave a Comment

Cookies help us deliver our services. By using our services, you agree to our use of cookies. More Information