Code to Enable Shortcodes on Widgets in WordPress- Add the following code snippet to your theme’s functions.php file:-
Tag: wordpress
Webp upload wordpress- If you want to save the storage space on your server, using the WebP format every time you want to upload an image is a reasonable reason. An image with the extension of .webp is 25% smaller in size than other formats like JPG and PNG. Add the following code to the
Code to Disable Post Revisions in WordPress- You can add the following line of code to your wp-config.php file:-
Code to Disable Admin Bar Access in WordPress- If you want to disable access to the admin bar for all the users including the administrator, add the following to your theme’s functions.php file:-
Code to Restrict Bots Access in WordPress Add the following code to .htaccess file.
Code to Show the Number of Search Results Found in WordPress- Display the number of search results found in your WordPress search results page by adding the following line of code to your theme’s search.php file-
Code to Prevent Image Hotlinking in WordPress- Go to .htaccess file and add the following code. Make sure you replace the ‘your-domain-name-here’ part with your actual domain name-
Deny Access to All .htaccess Files- You can add the following code to your .htaccess file to prevent access to it:-
Disable Theme and Plugin Editor in WordPress- To disable it, edit wp-config.php and add the following line of code just before the line saying “That’s all, stop editing! Happy publishing”:-