Content · Elementor

Dynamic Posts Grid widget for Elementor

A filterable grid of posts with AJAX search and Load More — for blogs and resource libraries.

Open live demo

Get King Addons

This page describes the PHP/JS for this widget — not a renamed stub. Install the free plugin from WordPress.org.

Get King Addons

What it actually does

A filterable grid of posts with AJAX search and Load More — for blogs and resource libraries.

render() writes HTML data attributes: data-card-clickable, data-columns, data-cpt-actions, data-cpt-icons, data-filter-taxonomy, data-max-pages, data-order, data-orderby.

Content is loaded with WP_Query in PHP (not a hardcoded list in the editor).

Some inspector controls are marked Pro in PHP (eicon-pro-icon / king-addons-pro-control). Those need King Addons Pro, not Elementor Pro.

The widget script reads data attributes: data-cpt-actions, data-cpt-icons, data-lg-uid, data-max-pages, data-page, data-post-type.

Clicks open LightGallery; the gallery is not a separate WordPress plugin.

How to add it in Elementor

  1. Install King Addons. Install Elementor and King Addons. Get King Addons from WordPress.org.
  2. Edit with Elementor. Open a page and click Edit with Elementor.
  3. Insert the widget. Search the panel for “Dynamic Posts Grid”. Typing “king” lists every King Addons widget.
  4. Set inspector controls from this widget’s PHP. Configure “Post Types”, “Posts Per Page”, “Order By”, “Order”. Style and Content tabs are listed on this page.
  5. Preview the published page. render() writes HTML data attributes: data-card-clickable, data-columns, data-cpt-actions, data-cpt-icons, data-filter-taxonomy, data-max-pages, data-order, data-orderby.

When to use it

Tip: After King Addons is active, type king in the Elementor search box to list every widget, including Dynamic Posts Grid.

Inspector controls from this widget’s PHP

ControlWhat the code does
Content — Post TypesSelect post types to display.
Content — Posts Per PageNumber of posts to display initially.
Content — Order ByThe chosen value is read in render() and applied on the front end. Options: Date; Title; Menu Order; Random; Comment Count.
Content — OrderThe chosen value is read in render() and applied on the front end. Options: Descending; Ascending.
Filtering & Search — Enable FiltersWhen this switch is on, render() outputs the wrapped markup.
Filtering & Search — Filter Title TextPrinted in the widget HTML from render().
Filtering & Search — Filter TaxonomyThe chosen value is read in render() and applied on the front end.
Filtering & Search — Enable SearchSwitcher inspector control (`kng_dynamic_posts_enable_search`).
Filtering & Search — Search PlaceholderPrinted in the widget HTML from render().
Grid Layout — ColumnsWrites CSS `grid-template-columns` onto the widget’s front-end markup. Options: 1; 2; 3; 4; 5; 6.
Grid Layout — Grid GapWrites CSS `gap` onto the widget’s front-end markup. (min 0, max 100).
Grid Spacing — Grid Bottom MarginWrites CSS `margin-bottom` onto the widget’s front-end markup. (min 0, max 100).
Load More — Enable Load MoreSwitcher inspector control (`kng_dynamic_posts_enable_load_more`).
Load More — Load More TextPrinted in the widget HTML from render().
Load More — Loading TextPrinted in the widget HTML from render().
Filter Title — TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-filter-title`.
Filter Title — Text ColorWrites CSS `color` onto the widget’s front-end markup.
Filter Title — MarginWrites CSS `margin` onto the widget’s front-end markup.
Filter Bar — BackgroundElementor background group: classic color/image or gradient on the selector. Selector: `{{WRAPPER}} .king-addons-dpg-filter-bar`.
Filter Bar — PaddingWrites CSS `padding` onto the widget’s front-end markup.
Filter Bar — BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-filter-bar`.
Filter Section Spacing — Filter Bar Bottom MarginWrites CSS `margin-bottom` onto the widget’s front-end markup. (min 0, max 100).
Filter Section Spacing — Filter Header Bottom MarginWrites CSS `margin-bottom` onto the widget’s front-end markup. (min 0, max 50).
Filter Section Spacing — Controls GapWrites CSS `gap` onto the widget’s front-end markup. (min 0, max 60).
Filter Section Spacing — Controls AlignmentWrites CSS `justify-content` onto the widget’s front-end markup. Options: Start; Center; End; Space Between.
Filter Controls — TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-posts-filter`.
Filter Controls — Text ColorWrites CSS `color` onto the widget’s front-end markup.
Filter Controls — Background ColorWrites CSS `background-color` onto the widget’s front-end markup.
Filter Controls — BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-posts-filter`.
Filter Controls — Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Filter Controls — PaddingWrites CSS `padding` onto the widget’s front-end markup.
Filter Controls — Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-posts-filter`.
Filter Controls — Use Custom Icon/ImageReplace default dropdown arrow with custom icon or image.
Filter Controls — TypeThe chosen value is read in render() and applied on the front end. Options: Icon; Image.
Filter Controls — Choose IconIcon rendered with Elementor Icons_Manager in this widget’s HTML.
Filter Controls — Choose ImageMedia Library attachment(s); render() uses the URL/ID as the image source.
Filter Controls — Icon SizeWrites CSS (font-size, width, height) onto the widget’s front-end markup. (min 8, max 30).
Filter Controls — Image SizeWrites CSS (width, height, object-fit) onto the widget’s front-end markup. (min 8, max 100).
Filter Controls — Icon ColorWrites CSS (color, fill) onto the widget’s front-end markup.
Filter Controls — Image OpacityWrites CSS `opacity` onto the widget’s front-end markup. (min 0.1, max 1).
Filter Controls — Typography (Kng Dynamic Posts Search Input Typography)Elementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-posts-search`.
Filter Controls — Text Color (Kng Dynamic Posts Search Input Color)Writes CSS `color` onto the widget’s front-end markup.
Filter Controls — Placeholder ColorWrites CSS (king-addons-dpg-posts-search, color) onto the widget’s front-end markup.
Filter Controls — Background Color (Kng Dynamic Posts Search Input Background)Writes CSS `background-color` onto the widget’s front-end markup.
Filter Controls — Border (Kng Dynamic Posts Search Input Border)Elementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-search-input`.
Filter Controls — Border Radius (Kng Dynamic Posts Search Input Border Radius)Writes CSS `border-radius` onto the widget’s front-end markup.
Filter Controls — Padding (Kng Dynamic Posts Search Input Padding)Writes CSS `padding` onto the widget’s front-end markup.
Filter Controls — Box Shadow (Kng Dynamic Posts Search Input Box Shadow)Elementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-search-input`.
Filter Controls — Button SizeWrites CSS (width, height) onto the widget’s front-end markup. (min 30, max 80).
Filter Controls — Button ColorWrites CSS `color` onto the widget’s front-end markup.
Filter Controls — Button BackgroundWrites CSS `background-color` onto the widget’s front-end markup.
Filter Controls — Button Hover ColorWrites CSS (king-addons-dpg-search-btn, color) onto the widget’s front-end markup.
Filter Controls — Button Hover BackgroundWrites CSS (king-addons-dpg-search-btn, background-color) onto the widget’s front-end markup.
Filter Controls — Button BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-search-btn`.
Filter Controls — Button Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Filter Controls — Button PaddingWrites CSS `padding` onto the widget’s front-end markup.
Filter Controls — Transition Duration (ms)Writes CSS `transition` onto the widget’s front-end markup. (min 100, max 1000).
Filter Controls — Use Custom IconSwitcher inspector control (`kng_dynamic_posts_search_use_custom_icon`).
Filter Controls — Choose Icon (Kng Dynamic Posts Search Custom Icon)Icon rendered with Elementor Icons_Manager in this widget’s HTML.
Filter Controls — Icon Size (Kng Dynamic Posts Search Icon Size)Writes CSS (width, height, font-size) onto the widget’s front-end markup. (min 10, max 50).
Filter Controls — Icon Color (Kng Dynamic Posts Search Icon Color)Writes CSS (fill, color) onto the widget’s front-end markup.
Filter Controls — Icon Hover ColorWrites CSS (king-addons-dpg-search-btn, fill, color) onto the widget’s front-end markup.
Cards — Icon PositionOptions: Left; Right.
Cards — Background ColorWrites CSS `background-color` onto the widget’s front-end markup.
Cards — BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-card`.
Cards — Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Cards — Min HeightWrites CSS `min-height` onto the widget’s front-end markup. (min 100, max 800).
Cards — Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-card`.
Cards — TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-card`.
Card Hover Effects — Hover TransformWrites CSS (king-addons-dpg-card, transform) onto the widget’s front-end markup. Options: None; Lift Small; Lift Medium; Lift Large; Scale Small; Scale Medium.
Card Hover Effects — Hover Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-card:hover`.
Card Hover Effects — Hover Border ColorWrites CSS (king-addons-dpg-card, border-color) onto the widget’s front-end markup.
Card Hover Effects — Transition Duration (ms)Writes CSS `transition` onto the widget’s front-end markup. (min 100, max 1000).
Card Hover Effects — Make Card ClickableMakes the entire card clickable to navigate to the post. Note: This feature works only on the live site.
Card Header — PaddingWrites CSS `padding` onto the widget’s front-end markup.
Card Header — Icon SizeWrites CSS (font-size, width, height) onto the widget’s front-end markup. (min 12, max 50).
Card Header — Icon ColorWrites CSS (color, fill) onto the widget’s front-end markup.
Card Header — Icon BackgroundWrites CSS `background-color` onto the widget’s front-end markup.
Card Header — Icon Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Card Header — Icon Container SizeWrites CSS (width, height) onto the widget’s front-end markup. (min 30, max 80).
Card Header — Icon Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-icon`.
Card Header — Label TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-label`.
Card Header — Label ColorWrites CSS `color` onto the widget’s front-end markup.
Card Header — Label PaddingWrites CSS `padding` onto the widget’s front-end markup.
Card Header — Label BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-label`.
Card Header — Label Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Card Header — Label BackgroundWrites CSS `background-color` onto the widget’s front-end markup.
Card Content — Content PaddingWrites CSS `padding` onto the widget’s front-end markup.
Card Content — Content Vertical AlignmentWrites CSS `justify-content` onto the widget’s front-end markup. Options: Top; Center; Bottom; Space Between; Space Around.
Card Content — Show ExcerptSwitcher inspector control (`kng_dynamic_posts_show_excerpt`).
Card Content — Title TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-title`.
Card Content — Title ColorWrites CSS `color` onto the widget’s front-end markup.
Card Content — Title Hover ColorWrites CSS (a, color) onto the widget’s front-end markup.
Card Content — Excerpt TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-excerpt`.
Card Content — Excerpt ColorWrites CSS `color` onto the widget’s front-end markup.
Card Content — Excerpt MarginWrites CSS `margin` onto the widget’s front-end markup.
Card Button — Container PaddingWrites CSS `padding` onto the widget’s front-end markup.
Card Button — Button TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-button`.
Card Button — Border StyleWrites CSS `border-style` onto the widget’s front-end markup. Options: None; Solid; Dashed; Dotted.
Card Button — Border WidthWrites CSS `border-width` onto the widget’s front-end markup.
Card Button — Default Border ColorWrites CSS `border-color` onto the widget’s front-end markup.
Card Button — Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Card Button — Button PaddingWrites CSS `padding` onto the widget’s front-end markup.
Card Button — Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-button`.
Load More Button — TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-load-more-btn`.
Load More Button — Text ColorWrites CSS `color` onto the widget’s front-end markup.
Load More Button — BackgroundElementor background group: classic color/image or gradient on the selector. Selector: `{{WRAPPER}} .king-addons-dpg-load-more-btn`.
Load More Button — Hover Text ColorWrites CSS (king-addons-dpg-load-more-btn, color) onto the widget’s front-end markup.
Load More Button — Hover BackgroundWrites CSS (king-addons-dpg-load-more-btn, background-color) onto the widget’s front-end markup.
Load More Button — BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-load-more-btn`.
Load More Button — Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Load More Button — PaddingWrites CSS `padding` onto the widget’s front-end markup.
Load More Button — Box ShadowElementor box-shadow group for the selector. Selector: `{{WRAPPER}} .king-addons-dpg-load-more-btn`.
Pagination — Section Top MarginWrites CSS `margin-top` onto the widget’s front-end markup. (min 0, max 100).
Pagination — Info TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-pagination-info`.
Pagination — Info Text ColorWrites CSS `color` onto the widget’s front-end markup.
Pagination — Count Numbers ColorWrites CSS `color` onto the widget’s front-end markup.
Pagination — Info Bottom MarginWrites CSS `margin-bottom` onto the widget’s front-end markup. (min 0, max 60).
Pagination — Loading Text ColorWrites CSS `color` onto the widget’s front-end markup.
Pagination — Finish TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-pagination-finish`.
Pagination — Finish Text ColorWrites CSS `color` onto the widget’s front-end markup.
Pagination — Finish Text MarginWrites CSS `margin` onto the widget’s front-end markup.
Messages — TypographyElementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-no-posts`.
Messages — Text ColorWrites CSS `color` onto the widget’s front-end markup.
Messages — Background ColorWrites CSS `background-color` onto the widget’s front-end markup.
Messages — BorderElementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-no-posts`.
Messages — Border RadiusWrites CSS `border-radius` onto the widget’s front-end markup.
Messages — PaddingWrites CSS `padding` onto the widget’s front-end markup.
Messages — Typography (Kng Dynamic Posts Error Typography)Elementor typography group: family, size, weight, transform, style, decoration, line-height, letter-spacing. Selector: `{{WRAPPER}} .king-addons-dpg-error-message`.
Messages — Text Color (Kng Dynamic Posts Error Color)Writes CSS `color` onto the widget’s front-end markup.
Messages — Background Color (Kng Dynamic Posts Error Background)Writes CSS `background-color` onto the widget’s front-end markup.
Messages — Border (Kng Dynamic Posts Error Border)Elementor border group: type, width, color, and radius when the group includes it. Selector: `{{WRAPPER}} .king-addons-dpg-error-message`.
Messages — Border Radius (Kng Dynamic Posts Error Border Radius)Writes CSS `border-radius` onto the widget’s front-end markup.
Messages — Padding (Kng Dynamic Posts Error Padding)Writes CSS `padding` onto the widget’s front-end markup.
Messages — Bottom MarginWrites CSS `margin-bottom` onto the widget’s front-end markup. (min 0, max 50).

Content and Style tabs from this widget’s PHP, including repeater fields and group controls (typography, background, border, shadow). Elementor’s Advanced tab is core Elementor and is not listed here.

FAQ

Which Dynamic Posts Grid options need King Addons Pro?

Controls marked with the Pro icon in this widget’s PHP. King Addons Pro is a separate license from Elementor Pro.

How do I add Dynamic Posts Grid in Elementor?

Install King Addons and Elementor, edit a page, search the panel for “Dynamic Posts Grid”, drag it onto the canvas, then set Content and Style.

Do I need Elementor Pro?

No. King Addons runs on free Elementor. Some King Addons options (for example template-in-accordion, extra popup conditions, parts of the template catalog) need King Addons Pro — not Elementor Pro.

Related content widgets

Get King Addons

One free plugin. 80+ Elementor widgets, 650+ templates, and 4,000+ sections. Search for Dynamic Posts Grid after you activate it.

Get King Addons