📜 ⬆️ ⬇️

Wordpress Games

Hello everybody. In this article we will talk about the first awkward experience of typesetting under Wordpress. I will describe the situation, the client purchased the theme for WP, the designers got a little fantasy and now we get the layout of a multi-page website (online store, the fruit of the client's perverted fantasy and painstaking designer work), which need to be put together, so that when stretching the engine did not want to strangle client, drown the designer and shoot himself.

But my first layout experience under WP cannot be called pleasant. The following points are not true in the first instance, it is only a description of my short experience, I hope that this information will be useful to someone, and of course I sincerely hope for criticism.
image

Immediately it should be noted that it is necessary:

Style Guide.
If possible, you need a guide, if the project is small, then you can do without it, but if you have more than one page, then I highly recommend talking with the designer, and it is better that the default designers always provide it to you. This will significantly speed up the layout if you pre-compose a number of components and define a number of basic styles.
')
Page logic.
You have to perfectly understand which pages will be made solely with the help of the visual editor, and which will be mostly used by shortcodes. Best of all, at once all the pages are divided into these groups, draw a diagram.

Header, Footer etc.
A great way to spend time is to create your own header and footer!
You can go an incredibly entertaining way, having a header, footer, write your own, and set “display: none” in the subject. Yes, this decision may seem quite acceptable to someone, but maybe not, I don’t know, I don’t read thoughts. But I can say with confidence which solution makes life much easier. This option is less fun, but you need to find the source structure (header.php, footer.php etc) and make changes to them. This also applies to other files.
If we write on WP, then it is necessary to use all its features.

Shortcode.
Great thing, although sometimes you can play around with them and a bit too far. Use them only where it is really necessary. Remember, you create a site on the CMS, the client may want to change something later. Almost everywhere I read it is recommended to write in functions.php. This is quite a normal, and perhaps a good option, but I will share another option - this is the removal of your shortcodes in a separate file shortcode.php. In the web, the component approach is now reigning, let's support his rule!

Images.
Here is just a little advice, because the client does not always follow the logic when filling the content of his site, that is, it makes sense to display images, photos as universal as possible. Use overflow for a wrapper, object-fit for image, also for image you can use max-width. Remember, the client may want to upload any image.

Template pages.
There are pages whose structure is repeated or the page itself will often repeat: a news page, a blog page, etc. You need to provide styles for the maximum number of tags (p, ul, li, h1 etc). If suddenly the client wants to add a list or title, span or em, and he will get out of the style of the site? It would be awkward.

Tables
When making fillable tables, I recommend not to use classes, since the customer often forgets to put classes on the tables. Yes, I know, it would be the best job in the world if not all of these customers.

Paragraphs.
If paragraphs use the selection not only in bold style, then as practice shows, it is better to wrap and use em for this purpose or, in extreme cases, span. The client is easier to wrap individual words in the em tag, because it is in the editor panel.

Styles
On this occasion, many opinions diverge. Some people think that if you work with the WP theme, then it is better to write most of the styles through the admin area, it will be easier for the client to understand and change this. Others believe that there is nothing for customers to allow for styles and everyone wants to write in the file. Here I consider it solely at your discretion and the desire of the client. If he has a basic knowledge of HTML / CSS, he may ask you to do it in the file.

In conclusion, I want to say that the layout for CMS practically does not differ from just the layout. There are a lot of questions on the net “how to typeset a CMS?”. Observing these small rules, it will be easier for you to adapt the layout for the engine.

Source: https://habr.com/ru/post/326368/


All Articles