Hi, I’m looking to add some simple css to all posts which use a sidebar template. What is the best way to do this? (This is the page templates and not the “Template Manager”)
Hi @clefler,
If you just want to add CSS codes, you can just add them in X > Theme Options > CSS:
As long as the CSS codes are correct, it should take effect to the pages using the sidebar template.
Also, you might want to prepend your CSS selectors with .page-template-template-layout-sidebar-content as that is the default class assigned to those pages that uses templates with sidebar. For example:
.page-template-template-layout-sidebar-content p {
}
The code above will target all the p tags on pages using the sidebar template.
Hope this helps.
ok great thank you…
would you be able to provide additional code to get some padding space where circled in red?
Hello @clefler,
Please try this code:
.single-post .x-site > .x-container {
padding-top: 30px;
}
Hope this helps.
perfect thank you!
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
