Custom Post Type Shortcodes

CPT Listings

Shortcode: [gd_cpt_listings]

Parameters:

  • cpt_img_width – width of the thumbnail for the CPT
  • cpt_img_height – height of the thumbnail for the CPT
  • title – the title for the cpt listings
  • cpt_exclude – post types to exclude (default shows all) (examples: ‘gd_place’ or ‘gd_place,gd_event’)
  • cpt_hide_name – hide CPT name? True or False (default = false)

This example shows a widget with the CPT images at 120×90 pixels:
[gd_cpt_listings cpt_img_width=120 cpt_img_height=90]

This example shows a widget with a custom title, and does not show a link to the gd_place CPT:
[gd_cpt_listings title="Browse listings" cpt_exclude=gd_place]