1. Home
  2. ReHub Theme
  3. How to …
  4. How to make auto contents for post

How to make auto contents for post

I included one interesting shortcode – Autocontents. It automatically add contents based on some tag. For example, you can divide your long article by H2 heading, so for creating autocontents add such shortcode:

[wpsm_titlebox title="Contents" style="1"][contents h2][/wpsm_titlebox]

if you need to show also subheadings, use

[wpsm_titlebox title="Contents" style="1"][contents h2 h3][/wpsm_titlebox]

Satisfy results. If you want to show list as line, use:

[wpsm_inline_list][contents h2][/wpsm_inline_list]

If you want to add contents inside sticky panel, use shortcode:

[wpsm_stickypanel][contents h2][/wpsm_stickypanel]

If you want to use Contents in sidebar, you can place shortcode in Rehub:Sticky on scroll widget. Use next shortcode (it will have also bordered box)

<div class="border-lightgrey-double pb15 pl5 pr15 pt15 rehub-main-color-border whitebg">[rh_side_contents]</div>

Also, you can use more powerfull wpsm_toplist shortcode, see how to use it.