This code adds a checkbox below the editor on all Edit screens for posts and pages. The box enables you to hide specific posts and pages from your front page loop.
You can use this code to remove/add single posts/pages on any/all archive page types.
Demo Video
Shows the checkbox added to the edit screen enabling admins to remove single posts or pages from the home page loop.
Tested using the Mai Display theme for Genesis however will work in any Genesis child theme.
Installation Steps
There’s 2 steps :
- # Upload the file named genesis-inpost-remove-post.php file to your child theme folder like this :
- # Copy & paste the PHP code ( excluding the opening PHP tag ) to the end of your child themes functions file.
Custom Field (Post Meta) Parameters
Uses get to retrieve the value of the $wp_query variable key meta_query containing an array of key/value pairs.
Was This Tutorial Helpful?