Removes the WordPress version number from your site’s HTML head and RSS feeds. Exposing the version can help attackers target known vulnerabilities in outdated releases, so hiding it is a simple, low-effort security hardening step. How to add it Open your child theme’s functions.php via Appearance > Theme File Editor, or use a snippets plugin […]
Limits how many revisions WordPress stores for each post or page. By default WordPress keeps unlimited revisions, which can bloat the database and slow down the admin over time. This snippet caps it at a number you choose. How to add it Open your child theme’s functions.php via Appearance > Theme File Editor, or use […]
Sends users to a specific page after they log in, based on their role. Administrators go to the dashboard, while everyone else (subscribers, customers, members) lands on the homepage or a custom page such as My Account. How to add it Open your child theme’s functions.php via Appearance > Theme File Editor, or use a […]
Hides the black WordPress admin bar on the front end for every user except administrators. This is useful for membership sites, WooCommerce stores, and LMS sites where subscribers and customers shouldn’t see the toolbar. How to add it Go to Appearance > Theme File Editor and open your child theme’s functions.php. Alternatively, install a snippets […]
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Open a blog post without a manually written excerpt. WordPress will generate an excerpt from its content.
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Open a search results page on your website. View the page source and check for the robots meta tag.
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Open any single blog post on your website. The displayed post title will use title case.
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Search for a keyword on your website. Matching keywords in post titles will appear highlighted.
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Search for any keyword on your website. The result count will appear before the search results loop.
Steps Add the PHP code to your theme’s functions.php file or a PHP snippets plugin. Save and activate the snippet. Visit your website and check the search form.