1- Html and PHP: for social networks, you put them in another file, for example social-Blox.php, then call it
<?php include(locate_template( 'templates/social-Blox.php' ));?>
you now have a social in a separate file that you can use in many places and it is still very bright without loading plugins or any thing
after that inside social-Blox.php you do not add only html NO. parts that will be changed later, you can use ACF parameters or themes ... make them dynamic, for example, links for facebook and twitter ... etc.
<a href="<?php the_field("facebook",105); ?>" class="icoFacebook a_t" title="Facebook"> <i class="fa fa-facebook"></i> </a>
fields that need to be changed, for example, on social networks I add them to a user page, such as a “shared page”, so the client changes them from there, I use these values every time they are like this and in these files ...
here you reuse file blocks ... and reuse data ... with one control panel.
2- widget and short code: I don’t like that it needs more time to develop its difficult reuse and allow the client to use it in their work.
Plugins with plugins are always a big problem for performance, the less you use them better ...
- There are large well-known plugins that you cannot replace or recreate, like AFC, mailPoet ...
- There are small plugins, but you have the idea you need and grab the plugin. Basically its files are 1, you need PHP, and you need css and JS, and add it to BOlX, as I explain earlier (in this case you will take a maximum of 50% of the plugin code), and now the code is yours not closing a block with a process in which you do not need problems that you do not know ...
source share