Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Log in using a Subscriber account and try to open the WordPress dashboard. Hook Used – admin_init — Runs during WordPress admin initialization and redirects matching users. Type: WordPress Access Customization Output: Users with […]
Steps Upload your logo to the WordPress Media Library. Copy its image URL. Replace /wp-content/uploads/site-logo.png in the code with your logo’s actual URL. Add the snippet to your child theme’s functions.php file or a PHP snippets plugin. Visit yourdomain.com/wp-login.php to check the result. Hook Used login_enqueue_scripts — Adds custom CSS to the login page. login_headerurl […]
Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Go to WordPress Admin → Posts → All Posts. Hook Used manage_posts_columns — Adds the Post ID column. manage_posts_custom_column — Displays each post’s ID. Type: WordPress Admin Customization Output: A Post ID column appears […]
Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Log in as a non-administrator to verify the admin bar is hidden on the front end. Hook Used – show_admin_bar — Controls whether the WordPress front-end admin bar is displayed. Type: WordPress Admin Customization […]
Description: Switches back to the Classic Editor for posts and pages. Hook: use_block_editor_for_post (filter) How to use: Add it to your child theme’s functions.php or a snippet plugin. It takes effect immediately for all posts.
Creates a new content type, for example “Portfolio”. How to use: Add it to functions.php (or better, a small plugin so it survives theme changes). Then go to Settings → Permalinks → Save to flush rewrite rules.
Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Open WordPress Admin → Dashboard. Hook Used – wp_dashboard_setup — Registers the custom dashboard widget. Type: WordPress Admin Customization Output: A new Website Management Tips widget appears on the WordPress dashboard. Customize: Change the […]
Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Open any WordPress admin page to see the notice. Hook Used – admin_notices — Displays a notice in the WordPress admin area. Type: WordPress Admin Customization Output: An informational notice appears at the top […]
Steps Add the PHP code to your child theme’s functions.php file or the Code Snippets plugin. Save and activate the snippet. Go to WordPress Admin → Posts → All Posts. Hook Used manage_posts_columns — Adds the new column. manage_posts_custom_column — Displays the last modified date. Type: WordPress Admin Customization Output: A Last Modified column appears […]
Steps Add the PHP code to your theme’s functions.php. Save the changes. Go to WordPress Dashboard → Posts → All Posts. A new Featured Image column will appear. Posts with a featured image will show a thumbnail.