Answer the question
In order to leave comments, you need to log in
How to competently change the theme of the site to WP, if the old theme has a lot of self-written functionality?
There is a WP site that has been around for a very long time, and its templates have a lot of the necessary self-written functionality. Pieces of important code are not only in functions.php, but also scattered throughout the php code of the templates.
Now the new design templates (html+css+js) have been laid out.
What approach would you recommend, are there any "pitfalls"?
Answer the question
In order to leave comments, you need to log in
Here you are faced with the advice of literate people "code, instead of a plugin." Everything when they stuffed it into functions.php and when they put it directly into the template - did you think the site would work faster from this? This is called saving on matches.
And now how to work - put a new theme on the test domain and transfer the functionality of the old site, but already turning the code into small plugins. The code solves one problem - here's a new plugin for you. And so step by step to transfer all the functionality. Use conditional VI tags. Use hook functionality. In the theme template, just call the function, like one stellar plugin suggests:
That's when you will have the flies separated from the cutlets
If you are well versed in WP, then I would advise you to transfer everything to some of your plugins. If not, then just transfer the functionality by pulling a new template, I think this will not be much work.
Before all this, I would advise you to update everything and check the performance (I hope the kernel was not touched?).
After prohibiting WP and plugins from updating themselves.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question