Title: Using Recent Posts as Home
Last modified: December 2, 2020

---

# Using Recent Posts as Home

 *  Resolved [jazzbrew](https://wordpress.org/support/users/jazzbrew/)
 * (@jazzbrew)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/using-recent-posts-as-home/)
 * Hello,
 * I would like to have the slider display on my home page but I am using the recent
   posts page. I added the code below to my header:
 * `<?php echo do_shortcode('[metaslider id="419 restrict_to=home"]'); ?>`
 * But that hides it from all of my pages. Not using the restrict_to option causes
   it to show up on all pages. Is there a way for the slider to only appear on the
   recent posts page?
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-recent-posts-as-home%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Kevin Batdorf](https://wordpress.org/support/users/kbat82/)
 * (@kbat82)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/using-recent-posts-as-home/#post-13737484)
 * Hi,
 * The code you have there looks wrong, try this (notice the change of “):
 * `do_shortcode('[metaslider id="419" restrict_to="home"]')`
 * If still not working, you can wrap it in a conditional like this and it will 
   only show on the blog page.
 *     ```
       <?php
       if (is_home()) {
         echo do_shortcode('[metaslider id="419 restrict_to=home"]');
       }
       ?>
       ```
   
 *  Thread Starter [jazzbrew](https://wordpress.org/support/users/jazzbrew/)
 * (@jazzbrew)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/using-recent-posts-as-home/#post-13738275)
 * You’re right — it was the first issue. I didn’t have double quotes around both
   parameters. Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Using Recent Posts as Home’ is closed to new replies.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=3523572)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [jazzbrew](https://wordpress.org/support/users/jazzbrew/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/using-recent-posts-as-home/#post-13738275)
 * Status: resolved