Question about Wordpress?

Good day! Please tell me about correct from the point of view of professional practice, layout of static pages. For example, I used to just create a separate template page-pagename.php or just the template - Name Template: templatename do everything in html. I recently saw the template colleagues, and he saw the whole content in an html template file page writes. and in the post, all the content in one post is displayed. I'm a little surprised by this, I'm not used to do so. Later, I reviewed the lesson about the "proper posadku on Wordpress", the user youtube - WebDesignMaster. It does the same thing, only instead of direct html code, sets the UNYSON plugin and makes through it all, there is certainly much more convenient to do so.

After some thought I came I came to the conclusion that it is even more logical and easier, except the plugins are updated, and UNYSON for example expanding, and if you want to add a new item to it, it is necessary to add in the code of the plugin.... In common as much as I thought it was easier, I still don't dare to devote themselves to this topic, I'm not sure in what direction to move.

So, the question about how to implement better and more convenient, as decided by the professionals?
July 9th 19 at 13:15
1 answer
July 9th 19 at 13:17
Solution
Lessons user WebDesignMaster not worth watching. WordPress he teaches with mistakes. (If you don't believe me, look in my previous answers, periodically answer questions from people who had the misfortune learns in his video. Do not want to repeat).

On the layout:
both of these approaches can be applied to use in each particular case better, you need to watch.

1 layout in the template:
more professional, of course, the whole layout of the to do in the template code. And the content to keep in the database with adding a minimum markup.

The advantages of this approach:
not dependent on the plugin (wanted to change the plugin/engine - no problem, change)
usually, this page will be easier for a search bot
cleaner code (no drag on the page a bunch of unnecessary js/css from the plugin), faster page loads
Cons:
you need to be able to impose
the customer will not be able to change the design of the page itself (in my opinion, questionable disadvantage. From experience, later the customer himself almost never the design will not change, maybe in the plugin to understand it will be difficult)

2 layout by configuring the plugin:
Pros:
fast, cheap, lots of functions
immediately there is a handy admin panel to create pages

Cons:
you can only do what is provided in the plugin to add new functionality can be very expensive
code goes terrible (usually the plugins/paid templates are loading a bunch of styles/scripts), hence we obtain a complexity of support and complexity of task automation (for example adding automatic publication of news from an external source with the desired formatting may take longer in the order)
some customers admin made such plugins, too complicated (occasionally I see orders like "we bought a template with a visual editor, set it to us at least as on demo website")

In a nutshell, with this approach you can quickly make a website of, sorry, g@BHA and sticks, to sell it to the customer and to escape quickly to do another. In some cases the customer this level of performance is quite satisfied.
Thank you for reply) I would like to know if you compile all the template files, without the page Builder, as you can adjust the different output of content on page.php to output for example a different category, and that in certain cases, but the overall design of this page was for all pagov one. I just copy-paste it in a different template structure, which should be the same everywhere, and some block I deduced a different category using WP_Query. As it is correctly implemented at all?) can't understand it. The only way I can see it in the theme file to make the folder shortcodes, to make a shortcode with output different contents and paste into the page through the admin panel and output via the_content(). Maybe I'm not even going there, I don't know. Finally want to know really who understands this and will help to advise how this is all done. - jaquelin_Litt commented on July 9th 19 at 13:20
: here is a picture of the template hierarchy
https://developer.wordpress.org/files/2014/10/temp...

again in different cases can be done in different ways.

all the logic you can cram into one file, in the same index.php there to look through is_page(), is_tax() and similar functions (here they are described https://codex.wordpress.org/Conditional_Tags )

and you can put everything in individual files according to the logic of the template hierarchy - Zoie.OReilly43 commented on July 9th 19 at 13:23
: I know that too. I described a specific case in which entangled) to 1 file so not cool to write, I do not like mess, I like order. but for each page with the same design, but different dynamic content you have to create a new file and copy-paste this template: get_header(), get_footer(), #page-content, etc in this case, I suggest a more professional approach? or lessons on this theme the Russian-speaking? - jaquelin_Litt commented on July 9th 19 at 13:26
:
better here with this article to start
https://codex.wordpress.org/%D0%A1%D0%BE%D0%B7%D0%... - Zoie.OReilly43 commented on July 9th 19 at 13:29
: thank you) I saw her) but still she did not give a clear answer to my question) - jaquelin_Litt commented on July 9th 19 at 13:32

Find more questions by tags WordPress