Show two different sized featured images on homepage

With get_post_thumbnail() you have the ability to insert a featured image in your theme. the_post_thumbnail( $size, $attr ); holds to parameter 1. The size of your image and the ID. If you would like to have 2 image sizes of featured images on your home page you could do it like this: if(is_front_page(){ // only … Read more

View homepage in a preview mode

I think you can set your post to private to view it privately on the homepage. Once you change the visibility to private, the post or page status changes to “Privately Published” as shown. Private posts are automatically published but not visible to anyone but those with the appropriate permission levels (Editor or Administrator). See … Read more

Remove the Homepage Query

The posts_request filter Skimming through the WP_Query we find this part of interest: if ( !$q[‘suppress_filters’] ) { /** * Filter the completed SQL query before sending. * * @since 2.0.0 * * @param array $request The complete SQL query. * @param WP_Query &$this The WP_Query instance (passed by reference). */ $this->request = apply_filters_ref_array( ‘posts_request’, … Read more

Style something only on the home page

WordPress body_class($class) is a nice dynamic way to load styles, js for specific body contents. If your theme doesn’t support body class add them very simply: Open the header.php (or the template that contains the <body> tag) Edit the <body> tag and make it to <body <?php body_class(); ?>> — you are Done! 🙂 Now … Read more