31st Jul '25
/
0 comments

WordPress Posts using WP REST API in Bricks

WordPress Posts using WP REST API in Bricks

This Pro tutorial provides the steps to display posts from any WordPress site that has WP REST API enabled in Bricks builder using a custom query type.

This is the equivalent of the previous tutorial, but with the freedom to use Bricks elements like Basic Text, Heading and Image for visually building the posts layout.

Step 1

Add the following in child theme's functions.php (w/o the opening PHP tag) or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Get access to all 610 Bricks code tutorials with BricksLabs Pro

Related Tutorials..

Pro
Filtering posts by a group field’s subfield value with Meta Box when using a custom table in Bricks

Filtering posts by a group field’s subfield value with Meta Box when using a custom table in Bricks

Filtering a query loop to output only those posts with the value of a Select subfield of a Group field set to Yes when using…
Categories:
Tags:
Pro
Posts Grouped by Month and Year in Bricks

Posts Grouped by Month and Year in Bricks

Nesting query loops with months & years in descending order, with the inner loop outputting the posts.
Categories:
Pro
Custom Nested Queries in Bricks

Custom Nested Queries in Bricks

In most of the previous tutorials covering nested query loops in Bricks on this site, we accessed the parent query's looping object in the inner…
Categories:
Pro
Search Results Grouped by Post Types in Bricks

Search Results Grouped by Post Types in Bricks

Updated on 08 Oct 2024 This Pro tutorial provides the steps to arrange the search results by specified post types in a Bricks site. We…
Bricks Templates Query Loop

Bricks Templates Query Loop

How display Bricks Templates with saved screenshots in a query loop.
Categories:
HappyFiles Bricks Query Loop

HappyFiles Bricks Query Loop

This tutorial explores different ways in which images from WordPress Media Library organized via HappyFiles can be pulled and shown in Bricks using query loop(s).…
Categories:
How to List Your Posts Divided by Categories in Bricks

How to List Your Posts Divided by Categories in Bricks

In this tutorial, we'll learn how to display a list of posts divided by each category. The DOM tree Here is how I structured my…
Categories:
Pro
“My Favorites” in Bricks

“My Favorites” in Bricks

This Pro tutorial provides the steps to set up and use My Favorites in Bricks Builder.
Categories: