{"id":10727,"date":"2025-07-31T14:11:49","date_gmt":"2025-07-31T04:11:49","guid":{"rendered":"https:\/\/brickslabs.com\/?p=10727"},"modified":"2025-12-12T11:15:30","modified_gmt":"2025-12-12T00:15:30","slug":"wordpress-posts-using-wp-rest-api-in-bricks","status":"publish","type":"post","link":"https:\/\/brickslabs.com\/wordpress-posts-using-wp-rest-api-in-bricks\/","title":{"rendered":"WordPress Posts using WP REST API in Bricks"},"content":{"rendered":"<div class=\"mp_wrapper\">\n  <div class=\"mepr-unauthorized-excerpt\">\n    <p>This <a href=\"https:\/\/brickslabs.com\/pro-tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">Pro tutorial<\/a> provides the steps to display posts from any WordPress site that has WP REST API enabled in Bricks builder using a custom query type.<\/p>\n<p>This is the equivalent of the <a href=\"https:\/\/brickslabs.com\/display-external-wordpress-posts-using-wp-rest-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">previous tutorial<\/a>, but with the freedom to use Bricks elements like Basic Text, Heading and Image for visually building the posts layout.<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><img src=\"https:\/\/brickslabs.com\/wp-content\/uploads\/2025\/07\/CleanShot-2025-07-31-at-13.59.30@2x.png\" alt=\"\" class=\"wp-image-10731\" \/><\/figure>\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/brickslabs.com\/wp-content\/uploads\/2025\/07\/WordPress-posts-rest-api-bricks.png\"><img src=\"https:\/\/brickslabs.com\/wp-content\/uploads\/2025\/07\/WordPress-posts-rest-api-bricks-1024x490.png\" alt=\"\" class=\"wp-image-10730\" \/><\/a><\/figure>\n<h2 class=\"wp-block-heading\">Step 1<\/h2>\n<p>Add the following in <a href=\"https:\/\/brickslabs.com\/go\/child-theme\" target=\"_blank\" rel=\"noreferrer noopener\">child theme<\/a>'s <code>functions.php<\/code> (w\/o the opening PHP tag) or a <a href=\"https:\/\/brickslabs.com\/go\/code-snippets-plugin\" target=\"_blank\" rel=\"noreferrer noopener\">code snippets plugin<\/a>:<\/p>\n  <\/div>\n  <div class=\"mepr-unauthorized-message\">\n    <p>This is a BricksLabs Pro tutorial.<\/p>\n<p>For full access login below or create your <a href=\"https:\/\/brickslabs.com\/pro\/\">BricksLabs Pro account<\/a><\/p>\n  <\/div>\n  <div class=\"mepr-login-form-wrap\">\n            \n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/brickslabs.com\/login\/\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/10727\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n        <a\n          href=\"https:\/\/brickslabs.com\/login\/?action=forgot_password\"\n          title=\"Click here to reset your password\"\n        >\n          Forgot Password        <\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n      <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The steps to display posts from any WordPress site that has WP REST API enabled in Bricks builder using a custom query type.<\/p>\n","protected":false},"author":1,"featured_media":10730,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"WordPress Posts using WP REST API in Bricks [PRO TUTORIAL]","_seopress_titles_desc":"Learn how to display posts from any WordPress site that has WP REST API enabled in Bricks builder using a custom query type in this step-by-step tutorial.","_seopress_robots_index":"","footnotes":""},"categories":[5,9],"tags":[162],"topic":[266],"class_list":["post-10727","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bricks","category-pro","tag-custom-query-type","topic-query-loop"],"acf":[],"featured_image_src":"https:\/\/brickslabs.com\/wp-content\/uploads\/2025\/07\/WordPress-posts-rest-api-bricks-600x400.png","featured_image_src_square":"https:\/\/brickslabs.com\/wp-content\/uploads\/2025\/07\/WordPress-posts-rest-api-bricks-600x600.png","author_info":{"display_name":"Sridhar Katakam","author_link":"https:\/\/brickslabs.com\/author\/sridhar\/"},"_links":{"self":[{"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/posts\/10727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/comments?post=10727"}],"version-history":[{"count":0,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/posts\/10727\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/media\/10730"}],"wp:attachment":[{"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/media?parent=10727"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/categories?post=10727"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/tags?post=10727"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/brickslabs.com\/wp-json\/wp\/v2\/topic?post=10727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}