News shortcode is one of the Jupiter shortcodes that provides a list of news in a grid style from News post type. There are some options to fine tune the news loop.
In this article, we’ll explain about configuring News shortcode.
To see the News shortcode in action, you may check the demo page.
Creating News Posts
Before displaying the news, some posts should be created to be used in the news shortcode.
To create a news post:
Displaying News Shortcode
To add the shortcode:
Configuring News Settings
After you added the News shortcode, a pop up window will appear where you can set options for this shortcode. Below is the detailed description of each option for News shortcode.
Showing Specific Posts
There are 3 settings in Portfolio Carousel Settings pop-up which allow you to show the posts based on specific categories, IDs or authors. Type the name of category, post or author to add them in the fields.
|Select Specific Categories||Determines categories of news posts. Posts from the selected categories will be only displayed.|
|Select Specific Posts||Determines specific news posts. The selected posts will be only displayed.|
|Select Specific Authors||Determines authors of news posts. Posts from the selected authors will be only displayed.|
Configuring Posts Number
|How Many Posts?|| Sets the limit for the News Posts you want to have in the front end of the website. If this option is set to -1 it means you do not want to have any limitation regarding the news posts count.|
|Offset|| Sets the number of post to displace or pass over, it means based on your order of the loop, this number will define how many posts to pass over and start from the nth number of the offset.|
Configuring News Styling
Only one option here that allows to style new shortcode. You can set image height value.
|Image Height||Sets the Image Height which will be suitable for your design.|
Two options are available for pagination settings:
|Show Pagination?||Enables/disables the pagination functionality for News loop.|
|Pagination Style||Select which pagination style you would like to use on this loop. Available options are: Classic Pagination Navigation, Load More Button, Load More on Page Scroll.|
Altering the Images Sorting
There are 2 settings in News Settings pop-up which allow you to alter the posts sorting. By default, Order and Orderby settings are set to Ascending and Date therefore it sorts the older posts ahead of newer posts.
|Order||Sets the ascending or descending order of the Orderby parameter.|
|Orderby|| Sorts the posts based on the selected parameter (date, menu order, title, …).|
Adding an Extra Class Name
You can read Adding custom CSS class to a shortcode article for further explanation.