Skip to content
themeforge
EN
Start free
Menu
  1. Home
  2. Attribute reference
  3. wp="post-title"
Core Blog and posts

A post’s title, text and featured image

wp="post-title"

The fields every post already has in WordPress: title, text, featured image, date. These values print them, without creating new fields.

Where it goes

On single.html, the template of one post, and inside the card of a wp-query list.

wp="post-title" on a heading, wp="post-content" on a <div>, wp="post-image" on an <img>, wp="post-date" on any text, wp="post-link" puts the post’s address into href.

Example: a blog post

Markup single.html
<main class="post" wp="post">
  <h1 wp="post-title">New autumn menu</h1>
  <p class="post__date" wp="post-date">October 1</p>
  <img src="images/post.jpg" alt="" wp="post-image">
  <div class="post__text" wp="post-content">
    <p>Pumpkin latte is back.</p>
  </div>
</main>
In the admin Posts → Edit post
Title New autumn menu
Content Pumpkin latte is back, and so is the cinnamon bun.
Featured image autumn.jpg
On the site the post page
New autumn menu

October 1, 2026

autumn.jpg

Pumpkin latte is back, and so is the cinnamon bun.

What matters

  • The client edits these in the ordinary post editor of WordPress, not in extra fields.
  • post-image only on an <img>; srcset is removed. For a background use wp="post-bg-image".
  • The date format comes from Settings → General.
  • post-content and post-excerpt on a <div>: WordPress wraps the text in paragraphs itself.

Common mistakes

The build log is the “Logs” tab of your project on themeforge.pro; the free markup check shows the same notes.

Not like this
<div class="cover" wp="post-image"
     style="background-image: url(images/post.jpg)"></div>

post-image on a block: the build logs the attribute, and the picture stays fixed.

Like this
<div class="cover" wp="post-bg-image"
     style="background-image: url(images/post.jpg)"></div>

post-bg-image sets the featured image as the background.

Alternative spelling

wp="post_title" works the same: the build gives an identical theme.

Used in recipes

Ready when you are

See your site’s WordPress admin before you pay.