Your AI design has a row of example blog cards. WPPasteKit fills them with your real posts, in the design of the cards.

Mark the grid and the fields

Add data-wp-posts="latest" to the grid or list that holds the example cards. The first card is the template and is repeated for every post. Inside it, data-wp-field says what goes where:

<div class="cards" data-wp-posts="latest">
  <article class="card">
    <a href="/" data-wp-field="url">
      <img src="example.jpg" alt="" data-wp-field="image" data-wp-fallback="remove">
    </a>
    <span data-wp-field="category">News</span>
    <time data-wp-field="date">12 May 2026</time>
    <h3><a href="/" data-wp-field="url"><span data-wp-field="title">Example title</span></a></h3>
    <p data-wp-field="excerpt" data-wp-words="20">Example summary.</p>
  </article>
  <!-- two more example cards -->
</div>

Fields

  • Text fields replace the text of the element: title, excerpt, content, date, modified, author, category, categories, tags, comments and reading_time.
  • url sets the link of an a element. author_url and category_url work the same way.
  • image sets the source and alt text of an img, or a background image on any other element. author_avatar works the same way.

Field options

  • data-wp-words="20" sets the length of the excerpt.
  • data-wp-format="j F Y" sets the date format.
  • data-wp-size="medium" picks the image size.
  • data-wp-fallback="remove" drops the image when a post has no featured image.

Which posts

  • latest shows the newest posts.
  • related shows posts from the same category as the current post.
  • current shows the posts WordPress is showing on the blog, archives and search results.

Fine-tune the loop with data-wp-count, data-wp-category, data-wp-tag, data-wp-post-type, data-wp-order, data-wp-offset and data-wp-exclude-current="no". By default, the loop shows as many posts as there are example cards.

No posts yet

Add a child with data-wp-empty to show a message when there are no posts. Without posts, a plain latest loop keeps showing the example cards.