Design custom template
-
Hi
Another “newbie” Question, but I didn’t find any answer around the internet and the codex as well.I created a custom template (wspage.php “Worshopseite”). To start with it, I copied the code of the page.php to my template under the template Name-comment.
Everythings fine. It appears in my backend, and I can assign it to my pages …
but …
I can’t figure out, how to “design” this newly created “page”, because nearly everything concerning layout is in the style.css. And I cannot see, how to change design/layout ONLY for the pages with the wspage-template.i.e: the code for the content and sidebars concerning pages is:
body { margin: 0; width: 100%; } .site-header { border-top: none; border-bottom: none; /*background-image: url(https://lustvollleben.at/wp-content/uploads/2018/01/Background_Vieux-Moulin.jpg);*/ background-color: rgb(0, 22, 0, 0.5); background-repeat: no-repeat; background-size: cover; } .main-navigation-wrap { border-top: none; background: transparent; color: #fff; } .container { margin: 0 auto; padding: 0; max-width: 100%; width: 100%; } .site-content { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; -webkit-box-orient: horizontal; -webkit-box-direction: normal; width: 100% } .content-area { order: 2; box-sizing: border-box; padding: 2em 2em 0; width: 68%; margin: 1%; border-right: 1px solid #e5e5e5; border-left: 1px solid #e5e5e5; background-color: rgb(234, 207, 159, 0.8); -webkit-box-ordinal-group: 3; -ms-flex-order: 2; } .main-sidebar { order: 1; padding: 0.5em; width: 15%; border-left: 1px solid #e5e5e5; background-color: rgb(221, 184, 110, 0.9); -webkit-box-ordinal-group: 2; -ms-flex-order: 1; } .small-sidebar { order: 3; padding: 0.5em; width: 15%; background-color: rgb(136, 129, 138, 0.8); -webkit-box-ordinal-group: 4; -ms-flex-order: 3; }
If I just want to change, the width of content area and its margin:
.content-area { order: 2; box-sizing: border-box; padding: 2em 2em 0; width: 70%; border-right: 1px solid #e5e5e5; border-left: 1px solid #e5e5e5; background-color: rgb(234, 207, 159, 0.8); -webkit-box-ordinal-group: 3; -ms-flex-order: 2; }
.. and I want this ONLY to affect the pages with the wspage-template.
How do I do this ?
Tnx in advance ??
Worels- This topic was modified 6 years, 10 months ago by .
- This topic was modified 6 years, 10 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Design custom template’ is closed to new replies.