the answer for all question about Oxygen Builder plugin and WordPress

I have a section on the homepage and I would like to display the latest blog pos


I have a section on the homepage and I would like to display the latest blog post title, excerpt and featured image (in the background) for that section. Not a slider just a single image, title and excerpt as seen below. Currently I do not have this dynamically working, I am just manually updating when new post is published. Any guidance would be appreciated 🙂 I’m hoping I don’t have to rebuild using a repeater element. Thanks!




Source

2 Comments
  1. Korbin Perry says

    Following as I am curious also. One way to do it probably would be easy post / repeater as you mentioned, but with only the one result. Has to be a simpler way though.

  2. Davor Mlinarić says

    $the_query = new WP_Query(array(‘post_type’ => ‘post’));
    $image_url = wp_get_attachment_url( get_post_thumbnail_id($the_query->posts[0]->ID) );

    echo $the_query->posts[0]->post_name;
    echo $the_query->posts[0]->post_excerpt;
    echo $the_query->posts[0]->post_content;
    echo $image_url;

Leave A Reply

Your email address will not be published.

Oxyrealm Docs