Listings Shortcode

You can also use our listings shortcode to display listings directly on any page or post.

If you are using the block editor, there is a shortcode block you can use to insert the shortcode. Alternatively, if you are using the classic editor, you simply paste the shortcode wherever you want your feed to display.

[lp_listings]

Shortcode Attributes

There are a number of shortcode attributes available separated into several categories which you can use to customize the output.

DESIGN

  • display – defines if feed displays as Grid, Carousel or Map view. Defaults to Grid. Options are grid, carousel or map. Specify one only.
  • layout – defines which one of our pre-built layouts is used. Defaults to 1. Used in conjunction with display.

    For display = Grid or Carousel, options are 1, 2, 3 or 4. Specify one only.
    For display = Map, options are 1 or 2. Specify one only.

  • columns – the number of columns to display. Use in conjunction with grid or carousel layout 2. Options are 1, 2, 3 or 4. Specify one only.

SECTION

  • section_background_image – adds a background image to the HTML wrapper for the feed. Use image URL.
  • section_background_color – adds a background color to the HTML wrapper for the feed. Use HEX code or RGBA value.
  • section_font_color – defines the font color of section header and section footer.
  • section_padding_top – Change the padding-top of the feed section. Use valid CSS value only.
  • section_padding_bottom – Change the padding-bottom of the feed section. Use valid CSS value only.
  • section_width – defines the width of the feed. Defaults to default which is a max width of 1140px. Options are default, small, medium, large or full. Specify one only.
  • header_title – displays header title text above the feed.
  • header_sub_title – displays header sub title text above the feed.

POSTS

  • content_to_display – The content to display on each posts. Defaults to values price, category, model, location, stock_no, condition, makes, length, sleeps, atm, tare, and tow_ball_weight. Accepts multiple values. Use comma to separate.
  • show_gallery – Display listing gallery. Defaults to no. Specify yes to show.
  • max_words – maximum number of words to display in the description. Defaults to value set under plugin Settings -> General. Use -1 to show full description or 0 to hide description.
  • max_posts – the maximum number of posts to display in your feed. Defaults to value set under plugin Settings -> General.
  • posts_per_page – toggles pagination on. Use in conjunction with max_posts. Defaults to value set under plugin Settings -> General.
  • view_more_link – display a view more button. Specify the URL.

CUSTOM

  • classes – adds an HTML wrapper class so you can modify the specific output with custom CSS.

Examples

Here are some examples of how our shortcode can be used to display Listings.

Reviews Example 1

[lp_listings header_title="Latest Listings" header_sub_title="Check out what's in stock!" max_posts="3" max_words="20"]

The shortcode above will display the latest listings with the header title text will display as Latest Listings with sub title text Check out what's in stock. The first 20 words of the review description will be displayed followed by a read more link. As no layout has been specified, the default which is layout 1 is used.