-
1. how do i remove the header, because i want to embed html video into the post page. now this is very easy for me in a full width page but im not sure how to go about this.
2. the sidebar on the post page how do i get rid of that
Hello, i’ll answer in order:
This requires a bit of coding. Normally this is a customization that doesn’t fit in theme support but i’ll do my best to guide you to the solution. You’ll have to put a bit of effort in following the steps below:
This theme has 3 templates for posts: default, video and tutorial.
they use separate header templates (different PHP header files are loaded for each one).I’ll do an example using the Video template. This means the template that is being used when you choose the Video post format.
This template is called template-video.php
The headers are called between line 16 and 25
https://imgur.com/a/9ass6z9You can delete them and then work with Page Builder. Please be aware that you will also need to change the width of the page, and to put the contents into a boxed row.
To make the template full width, you have to:
- remove the class qt-container from line 41
- and, to remove the sidebar, change l8 to l12 at line 43
- To remove the sidebar, delete 122 > 126 (https://imgur.com/a/WttdVSh)
All those changes refere to the line numbers before removing the headers.
of course this works only for the Video post format template, if you need to change tutorial or default, same story for the other tempaltes. But you technically will not have life easy to do it on the tutorial page. As you can see the tutorial has an animation and changing this template is a completely different story, as would lead to an endless cascade of problems, so I suggest changing only default and video templates.One question-related:
What if I want to hide the sidebar only for certain posts?Is it best to create a full with post template or just to hide the sidebar in each of the posts I want to hide them?
Thanks
Hello!
I think the best solution is to create a full-width post template. Hiding the sidebar will work but you’ll see an empty space on the right of the post and the content will remain on 2/3 of the page.Here’s the result: https://imgur.com/a/QZDLlAa
unless you do that, hide it, and then set the row to stretch.
wouldn’t that be easier in terms of coding?
Otherwise, can you let me know how to create a full-width template for posts?
From what I have seen in your comment up there it is a bit unclear to me, since don’t know much about coding.
Thanks
What I can do for you is suggest an easy code fix, but will affect all your posts.
Otherwise, I can point you on how editing PHP files to create a new post template but for sure you will need some PHP knowledge.Have a good one!
AndreaIs there something like a “copy-paste” code that I can use in custom CSS on the posts I don’t want to have a sidebar?
I do not have PHP knowledge, so I am trying to find another option 🙂
Thanks
Hello!
Here’s a CSS workaround that works for single posts:- Go to WP Bakery Page Builder -> Role Manager -> Post types, select Custom from the dropdown and then enable the checkbox on posts.
- Now on your posts you don’t want the sidebar, click on Backend Editor on the top left button and then click on the wheel icon.
Paste this CSS snippet “.qt-sidebar {display:none;}”
Now the sidebar for that specific post will be hidden.
Be aware that the main content will fit 2/3 of the container and it will not be stretched.Hope this can help you.
Have a good day,Andrea
- This reply was modified 6 years, 3 months ago by themes2go.
Glad to hear it! 🙂
Going to close this ticket.Have a good one!
Andrea
The topic ‘few questions about post page’ is closed to new replies.