Answer the question
In order to leave comments, you need to log in
How to create a theme for WordPress?
Designed a "website": html+css+js. I wanted to transfer it to the CMS (since I have no experience with server languages, to write a back).
I looked at a bunch of lessons and re-read a lot of literature (really a lot). I did not find a universal explanation.
I already asked a question here, people advised MODX but there are even fewer clear lessons on it.
How to make a template, theme for CMS, having a ready-made site (only made up)?
.php not be able to... Are there any standard expressions suitable for any typed pages?
Answer the question
In order to leave comments, you need to log in
Creating a theme or "stretching" the layout on the CMS is not just a matter of transferring markup from one file to another. Often this is the implementation of the functionality that is displayed in the layout.
For example, if there is a block with phone numbers in the header, then you need to consider how these numbers will be added from the admin panel, and how to display them. If there is a block in the Latest News layout with article cards, then when creating a topic, you need to somehow organize the collection of the latest posts and then display them. In this regard, WP has, of course, ready-made solutions, but often if you take them out of the box, then they are displayed with the layout that the WP developers provided, otherwise you either need to redo your layout or delve into how the ready-made solution works and somehow change it. So without PHP it will be hard. If you don’t need anything non-standard, then everything is quite simple.
A WP theme consists of css styles, and php template files, as well as a functions.php script, which is more about functionality. You can create a theme from scratch, or inherit from some ready-made one, and redefine templates and styles in it.
The theme's main file, oddly enough, is style.css. First, create a new directory in the /wp-content/themes/ folder, create a style.css file in it, and add a comment to this file:
/*
Theme Name: Имя темы для админки
Author: себя любимого сюда
Text Domain: свои контакты для плюсиков в карму
*/
/*
Theme Name: Имя темы для админки
Author: себя любимого сюда
Text Domain: свои контакты для плюсиков в карму
Template: twentyseventeen
*/
Without knowledge of PHP only Modx. Documentation and lessons in Russian through the roof.
It all depends on the template engine that is used in the CMS. But that's how I see the Wordpress tag in the question.
WordPress themes are quite easy to implement.
Any theme is divided into standard blocks (site header, footer, menu, sidebar, etc.). Files with names are created in accordance with these blocks. There are some peculiarities, but they are indicated in the documentation.
You understand - one and the same theme (template) designed by you for different CMS needs to be "assembled" in different ways in accordance with your own rules.
For example, the link for Wordpress Theme Creation
What is your goal of transferring layout to CMS? Make a task for yourself or for a customer? If for the customer, look for someone who will turn the layout into a theme. If done without frills and simply, then work for 1-2 days. If you need to learn, then you will have to deal with the server language a little. Take a standard WordPress theme and remake it to your layout. If you need to manage the site, then why not just work with HTML? How often do you need to change information?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question