Home > Net >  Wordpress Plugin or Code in function.php?
Wordpress Plugin or Code in function.php?

Time:01-02

I always see it said that the less plugins you use, the better the performance of the site, but what about those plugins that deactivate native functions with the idea of ​​optimizing performance?

Is it better to use a simple wordpress plugin to remove the blog like Disable Blog By Joshua Nelson or use your own code in the functions.php of the child theme?

CodePudding user response:

This all depends on preference and how technical you are with WordPress functions and code. You know your code and if you think some few lines of code in functions.php can achieve your purpose I see no need to install a new plugin.

CodePudding user response:

This depends of how much of the plugin you really need , disabling blog can be done with just :

function disable_blogging() {
    remove_action( 'init', 'create_initial_post_types', 0 );
    remove_action( 'init', 'create_initial_taxonomies', 0 );
}
add_action( 'init', 'disable_blogging', 0 );

But the plugin has a lot more to offer and if you want those features it sure makes sense to use it .Joshua Nelson's plugin is a well written one and its being updated & supported as well .

  • Related