Skip to main content

Post Loop Builder

Live preview of the Post Loop Builder element in the Salient WordPress theme. A four column masonry grid of six posts with category buttons, titles and author lines over the featured images, the first and last cards spanning two columns. Sample content, for demonstration only.
Architecture
A corner house that faces two streets at once
Ava MitchellMay 46 min
Landscape
Walking the ridge before the fog lifts
Interiors
Light, material and the long room
Photography
The platform, between two trains
Studio
The studio at the end of the day
Night
The stairwell after dark
Priya NairMar 264 min

The Post Loop Builder is the element for anything data driven: point it at a post type, narrow the query, and lay the results out. It is behind most of the blog listings, portfolio grids, news carousels and "related work" sections in the demos, and through a global section it can also become the blog archive and the related posts under every post.

The query and the layout are separate settings, so the same set of posts can be a masonry grid on one page, a carousel on another and a plain list in a sidebar without touching the content.

Usage​

  1. Add the Element: In the Salient WPBakery page builder, click Add Element and choose Post Loop Builder.
  2. Choose the Query: Set Select Post Type, then narrow it by category, count, offset and order.
  3. Pick a Display Type: Grid, Carousel or Stack. This decides the structure and which of the layout settings appear.
  4. Pick a Display Style: Under the Item Style tab. This decides what a single item looks like, and most of the remaining settings hang off it.
  5. Choose the Meta: Under Meta Data, turn on categories, excerpt, date, author, reading time and any custom fields.

Display Type​

The structure of the whole set. Most of the layout settings depend on which one is chosen.

  • Grid A responsive grid of items, with masonry layouts, sortable filters and load more pagination.
  • Carousel A horizontal slider with its own column count per breakpoint and the same controls as the Carousel element.
  • Stack Items layered on top of each other and revealed as the page scrolls, with an Animation Effect of Overlapping, Scale or Blurred Scale.
Live preview of the Post Loop Builder element in the Salient WordPress theme. Three post cards in a row inside a carousel stepping one card at a time, each carrying a category, the title and the author and date. Sample content, for demonstration only.
CarouselColumns per breakpoint, with pagination, overlaid arrows or a touch indicator as the controls. Overflow Visibility lets the next item peek in at the edge.
Live preview of the Post Loop Builder element in the Salient WordPress theme. A two column masonry grid of posts where the first item spans the full width and the next two share a row. Sample content, for demonstration only.
Photography
The platform, between two trains
Ava MitchellApr 117 min
Studio
The studio at the end of the day
Night
The stairwell after dark
Grid, masonryTurn on Masonry Layout and a second setting offers the arrangements for your column count: Horizontal, Vertical Staggered, Vertical Staggered Alt and Big and Small.
  • Grid Item Spacing Choice The gutter between items.
  • Grid Item Height Choice A fixed item height for the overlaid style, as a viewport percentage. Subtract Navigation Height keeps a 100vh item from running under the header.
  • Featured First Item Toggle Makes the first item span its own full width row above the rest. This is the setting behind most "one big post, then the grid" layouts.
  • Enable Sortable Toggle Adds a category filter bar above a grid, with Sortable Filters Alignment and an Active Color. Starting Category picks which filter is active on load.
  • Pagination Choice None or Load More, with the button's color.
  • Post Animation Choice How items arrive: Fade in from bottom, Fade in from right or Zoom out reveal, with a Stagger in milliseconds and an Easing.
Stack disables a few things

The Stack type has no masonry, filters or pagination, and it turns off image parallax. It is a presentation for a handful of items, not a listing.

Display Style​

What one item looks like. Found under the Item Style tab, and it is the setting that decides which of the other Item Style controls apply.

Live preview of the Post Loop Builder element in the Salient WordPress theme. Three post cards side by side with the category button and title over the bottom of each featured image, lifting on a shadow when hovered. Sample content, for demonstration only.
Architecture
A corner house that faces two streets at once
Ava MitchellMay 4
Landscape
Walking the ridge before the fog lifts
Marcus HaleApr 28
Interiors
Light, material and the long room
Priya NairApr 19
Content Overlaid on Featured ImageThe text sits on the picture. Text Content Layout puts it top left, in the middle, bottom left with or without a shadow, or in the corners.
Live preview of the Post Loop Builder element in the Salient WordPress theme. Six post titles in three columns; moving the pointer over one dims the others, brings its featured image up under the cursor, and prints the hovered title through the image in a blend. Sample content, for demonstration only.
Featured Image Mouse Follow on HoverTitles only, until the pointer lands on one: the others fade back, its picture rises under the cursor, and with Post Title Contrast Over Image the title prints through the picture in a blend.
Live preview of the Post Loop Builder element in the Salient WordPress theme. Three cards with the picture on top and the category, title and author beneath, each card rising on hover. Sample content, for demonstration only.
Photography
The platform, between two trains
Ava MitchellApr 11
Studio
The studio at the end of the day
Marcus HaleApr 2
Night
The stairwell after dark
Priya NairMar 26
Content Under Featured ImagePicture on top, meta beneath. Card Design gives each item a card background with its own hover color.
Live preview of the Post Loop Builder element in the Salient WordPress theme. A list of three posts with the featured image on the left and the category, title, excerpt and meta on the right, divided by hairlines. Sample content, for demonstration only.
Architecture
A corner house that faces two streets at once

How a tight urban plot became a home with a front on both sides.

Ava MitchellMay 46 min
Landscape
Walking the ridge before the fog lifts

Notes from a week of early starts above the tree line.

Marcus HaleApr 284 min
Interiors
Light, material and the long room

Three decisions that made a narrow space feel wide.

Priya NairApr 195 min
Content Next to Featured ImagePicture and text side by side. Image Width, Image Gap and Image Position set the split; a Divider Line separates the rows.
Live preview of the Post Loop Builder element in the Salient WordPress theme. A numbered vertical list of five posts, each row showing the counter, the date, the title and a read more link; a black background slides up under the hovered row. Sample content, for demonstration only.
May 4
A corner house that faces two streets at once
Read More
Apr 28
Walking the ridge before the fog lifts
Read More
Apr 19
Light, material and the long room
Read More
Apr 11
The platform, between two trains
Read More
Apr 2
The studio at the end of the day
Read More
Vertical ListOne post per row, with an optional counter and read more button. Its Hover Effect can reveal the picture behind the row, have it follow the cursor, recolor the row or nudge it.

Hover and color​

Live preview of the Post Loop Builder element in the Salient WordPress theme. Three post cards under a blue color overlay that thins when hovered, with the titles in white. Sample content, for demonstration only.
Interiors
Light, material and the long room
Priya NairApr 19
Photography
The platform, between two trains
Ava MitchellApr 11
Studio
The studio at the end of the day
Marcus HaleApr 2
Color OverlayFor the overlaid style, a color over every picture with separate resting and hover opacities. Shown at full strength, the way a brand-colored grid uses it.
  • Hover Effect Choice For the image styles: BG Zoom, Slow BG Zoom, Animated Underline, Animated Underline Zoom or None.
  • Text Color and Text Color Hover Light or dark, each with a custom color, so the text can flip when the image zooms or the overlay changes.
  • Text Opacity and Text Hover Opacity For the overlaid style, fading the text in only when hovered.
  • Shadow on Hover Toggle Lifts the item on hover.
  • Border Radius Choice Rounds every item.
  • Add Mouse Indicator Toggle A label that follows the cursor over an item, in a Default, See Through or Small Tooltip style, reading View or Read.
  • Enable Image Parallax Toggle Moves the featured images against the scroll. Not available on the Stack type.

What each item shows​

Under the Meta Data tab. Every field is independent, so a grid can be as sparse as a title or carry the full byline.

  • Display Categories Toggle With a Category Style of Underline, Button or See Through Button, placed Above or Below the title, as clickable links or static text.
  • Display Excerpt and Excerpt Length The post excerpt, trimmed to a word count.
  • Display Date Toggle The post date in the byline.
  • Display Author Toggle The author name and avatar in the byline.
  • Display Estimated Reading Time Toggle A reading time worked out from the post's length.
  • Custom Fields Any meta field on the post, rendered in the item.
  • Post Title Heading Typography and Render Tag Which heading style the title borrows, and which tag it is actually output as, kept separate so a large title need not be an h2 for SEO.
  • Display Read More Button Toggle A button at the foot of the item, on the image styles.

Query​

The first group in the panel, and the one that decides what the layout is showing.

  • Select Post Type Choice Posts, portfolio projects, products or any custom post type registered on the site.
  • Blog Categories or Project Categories Choice Restrict the query to chosen terms. Leave empty for everything.
  • Posts Per Page Number How many items to fetch.
  • Post Offset Number Skip the first few. Useful for a featured post above the grid, with the grid starting at the second.
  • Order Choice Ascending or descending.
  • Orderby Choice Newest first, alphabetical, menu order, random, and so on.
  • Ignore Sticky Posts Toggle Stops sticky posts jumping to the front of a date ordered grid.
  • Exclude Current Post Toggle On a single post, leaves that post out of a "more like this" grid.
  • Remove Links Toggle Renders the items without links, for a display that is not meant to be clicked through.
Portfolio projects

For a portfolio grid specifically, the Portfolio Plugin page covers the project post type and its metaboxes, which supply the images and categories this element queries.

As your blog archive​

A Post Loop Builder placed in a global section assigned to the Blog Archive Loop special location stops being a block on a page and becomes the archive itself. Every post index, category, tag, author and date archive renders through it, using its Display Style and meta settings, and the theme's own blog templates step aside.

A category archive rendered by the Post Loop Builder: a featured first post spanning the full width with a category button and title over its image, then two smaller cards beside each other

What the element brings with it is the item design: Display Style, Hover Effect, Color Overlay, categories, excerpt, date, author, reading time, read more button, custom fields, card color and image loading. What it does not bring is the query. The archive already has one, WordPress's own, so Posts Per Page, ordering, offsets and the like are ignored here and the usual Reading Settings and archive rules apply. Pagination is the archive's too, which is why Load More and the infinite scroll option do not appear.

Two things change elsewhere once the location is active:

  • Blog Format replaces Blog Type In Salient Options > Blog, the Blog Type setting gives way to a Blog Format of Contained, Contained + sidebar or Fullwidth, with a note linking to the global section that now controls the design. Contained + sidebar keeps the sidebar beside the grid and matches the single post to it.
  • Related posts use the same element Under every single post, the related posts take the element's Display Style and meta, forced into a three column, non-masonry row of up to four posts, or two columns for the Content Next to Featured Image style.
Three related post cards under a blog post, each with a category button, title and author line over its featured image, in the same style as the archive
One element in the section

The location reads the first Post Loop Builder in the global section and nothing else. Anything else you place in that section is not rendered on the archive, so keep it to the one element and build the rest of the page elsewhere.

Hooks​

For anything the options do not reach, the element fires these. Every one is read from Salient Core's own source; the arguments each receives are listed so a callback can be written against them without reading the plugin.

HookDescriptionType
nectar_post_grid_queryThe query arguments, before the loop runsFilter
nectar_post_grid_post_typesWhich post types the element offers in its dropdownFilter
salient_el_post_grid_portfolio_queryThe query arguments when the source is the portfolioFilter
nectar_post_grid_excerptThe excerpt text for an itemFilter
nectar_post_grid_item_imageThe item's image markupFilter
nectar_post_grid_category_markupThe rendered category markup, also given the element's attributesFilter
nectar_post_grid_category_term_orderWhether term order is respected, true when a term ordering plugin is activeFilter
nectar_post_grid_custom_field_valueA custom field's value, also given the meta key and post IDFilter
nectar_post_grid_render_meta_keyWhether a given meta key renders, also given the key and the postFilter
nectar_post_grid_item_content_markup_beforeBefore an item's content markupAction
nectar_post_grid_item_bg_markup_afterAfter an item's background markupAction
nectar_blog_post_grid_item_startStart of a blog item, given the element's attributes and its queryAction
nectar_blog_post_grid_item_endEnd of a blog itemAction

The general hook reference is on the Developer page.