gdkob_list_articles
This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!
This shortcode is used to display a list of articles.
Attributes
Shortcode has several attributes:
- class: additional CSS class name to add
- category: one or more categories to filter entries.
- type: content type to show: ‘all’, ‘video’, ‘nonvideo’.
- sort_column: the column for sorting articles. The default is ‘name’.
- sort_order: articles sorting order. The default is ‘ASC’.
- limit: number of articles per category limit. The default is 4.
- product: ID of the product to limit the list.
- bgcolor: background colour for the list. The default is ‘#F4F4F4’.
Articles Sort Column
Sort column supports following values:
- name: article name
- ID: article ID
- date: article publish date
- comment_count: article comments count
- rand: random sort
- none: no sorting
Example
Shortcode:
[gdkob_list_articles sort_column="rand" sort_order="ASC" type="all" limit="4"]
Output: