Displaying a slider generated from your blog posts in the Customizr theme – Press Customizr Documentation
Mục Lục
Displaying a slider generated from your blog posts in the Customizr theme
In Customizr Pro v1.2.6 and Customizr v3.6.9, we have introduced a new feature which generates a home page slider based on your recent posts, or the featured (sticky) post(s) if any.
This feature saves the hassle of creating and updating slides to slider. You can set it once and it will always be updated with your recent posts.
In this documentation, we will be going through the necessary steps for using this feature.
Preparation : make sure your posts have a featured image ( post thumbnail )
First of all, we have to prepare the posts for the slider. Only posts with a featured image will qualify for the slider. You can skip this step, if your posts fit the requirements.
- Login to your WordPress Dashboard
- In your WordPress Admin Menu. Go to Posts -> Add New
- Create your post by adding a Title, Content and Featured Image. You can find the featured image metabox at the right hand lower corner of your screen. (If you can don’t set a featured image, the auto-generated slider will use the first image embedded in your content )
- Publish it.
- Repeat the above steps to create a few posts for the slider.
Enabling the post slider on home
- In your WordPress Admin Menu. Go to Appearance -> Customize -> Front Page -> Slider Options
- Look for Select front page slider. Click the dropdown and select “Auto-generated slider from your blog posts“.
- Ignore the “Create a Slider” button, that is for manually creating a slider.
- After making the above selection, the customizer will expand to show you a list of slider settings.
Slider Settings
-
Number of posts to display
-
Click on the dial to select or enter value in number.
-
The number of post slides displayed won’t exceed the number of available posts in your website.
-
- Select which kind of posts you want to display, There are 3 options for selection.
- All posts (display recent posts, preceded by sticky posts )
- Only the sticky posts (If you are not sure how to set a sticky post, please refer to this WordPress documentation)
- All posts excluded the sticky ones
- Display the title.
- Check this check box, if you want to display the post title in the slide.
- The title will be limited to a maximum of 80 characters.
- Display the excerpt.
- Check this check box, if you want to display the post excerpt in the slide.
- The excerpt will be limited to a maximum of 80 characters.
- Link post with. There are 3 options for selection.
- Call to action button
- Entire slide
- Entire slide and call to action button.
- Button Text.
- Use this text input to enter your call to action button name.
- Full width slider.
- Check this check box to allow the slider to occupy the full viewport’s width. The slider will be “boxed” if this setting is unchecked.
- Delay between each slides.
- Sets the period of waiting time taken, to move on to next slide.
- Value is in millisecond (ms). 1000ms is equals to one second.
-
Click on the dial to select or enter value in number.
- Set slider’s height in pixels.
- Use this setting to increase the slider height.
- Value is in pixels.
-
Click on the dial to select or enter value in number.
- Apply this height to all sliders.
- Check on this check box to force all sliders to the same height as the above setting.
- Replace the default image sliders height.
-
If this option is checked, your images will be resized with your custom height on upload. This is better for your overall loading performance. You might want to regenerate your thumbnails.
-
Finally, you have completed the settings. You can save and publish the slider by clicking on the ” Save and Publish” button found at the top left hand corner of your viewport.
Doc created by: Menaka S.