Here we will see How to create a page and assign a page template automatically in WordPress while activating theme.
1. Create Home page on Theme activation
Put the below code in function.php file :
WordPress includes a lot of extra stuff through the wp_head() hook included in most themes. Most of this stuff are unnecessary. A few lines of extra code in your header probably won’t slow your site down that much, but I like to keep things as clean and efficient as possible.
Here we will remove the following content from the header :
Want to move comment text to the bottom after name, email and URL fields? Learn how to move comment text field to the bottom in WordPress.
Simply add this code snippet in your theme’s functions.php file or in a site-specific plugin.
In today’s time, we require our site to be loaded in very short time. As nobody waits till your whole site is fully loaded. If your site is an eCommerce site then there are chances of decreasing valuable new customers due to long waiting of the site.
Nowadays Google also decrease your position in Website ranking. So you will not get proper site visit and turn less traffic towards the site. So here we will show you the basic steps to speed up the WordPress site without doing any type of code customization.