Shortcode: Topic list

You are here:
Estimated reading time: 1 min

To display a set of topics you can use topics shortcode. It can display topics in list or box view and show recent or specific topics. Almost any topic layout you can build on home page can be reproduced using this shortcode.

Check the following example:
[mkb-topics title="Featured topics" title_size="2em" columns="2col" topics="2,22"]

Featured topics

There are of course more options you can use. Here’s a complete list (so far):

ParameterDefaultExample ValuesDescription
titleEmpty“Title example”Title for topics section
title_colorEmpty“#333”Title color. Use HEX or RGB value
title_sizeEmpty“2em” or “20px”Title font size
topicsEmpty“22,30,50”List of topic IDs to display. When not present, recent topics are displayed. You can use recent, updated, top_views, top_likes to display dynamic topics.
view“box”“box” or “list”Layout for topics
columns“3col”“2col”, “3col” or “4col”Number of columns to display
show_count11 or 0Switch to show/hide articles count
show_description11 or 0Switch to show/hide topic description
show_all11 or 0Switch to show/hide Show all text
show_all_label“Show all”“View more”Text for show all link
hide_children01 or 0Show or hide child topics
limitEmpty5 or -1How many topics to display. Use -1 to show all.
articles_limitEmpty5 or -1How many articles to display for each topic.
count_bgEmpty“#336688”Articles count background color. Use HEX or RGB value
count_colorEmpty“#333”Articles count text color. Use HEX or RGB value
show_topic_icons11 or 0Switch to show/hide topic icons
show_article_icons11 or 0Switch to show/hide article icons (for list view)
use_topic_image01 or 0Use topic image instead of an icon
image_size“10em”“2em” or “20px”Vertical size limit for topic images.
force_topic_color01 or 0Use the same topic color for all topics, ignore custom topic colors.
force_topic_icon01 or 0Use the same topic icon for all topics, ignore custom topic icons.
article_icon“fa-book”“fa-file”Article icon class. Use any Font Awesome class name, they’re prefixed with fa-. When empty, global setting is used
topic_colorEmpty“#335588”Topic color. When empty, global value is used
box_item_bgEmpty“#888888”Background color for topics in box layout.
box_item_hover_bgEmpty“#888888”Background color for topics in box layout on hover.
topic_icon“fa-list-alt”“fa-book”
Topic icon class. Use any Font Awesome class name, they’re prefixed with fa-. When empty, global setting is used
icon_padding_topEmpty“2em” or “20px”Topic icon top padding.
icon_padding_bottomEmpty“2em” or “20px”Topic icon bottom padding.
Was this article helpful?
Dislike 5 18 of 23 found this article helpful.
Views: 2383
Previous: Shortcode: Topic
Have questions? Search our knowledgebase.
Send this to a friend