β²οΈ Estimated reading time: 5 min
β Identify WordPress Posts Without Tags or Excerpts Using a Custom Dashboard Widget
Discover how to enhance your WordPress dashboard by creating a custom widget that lists posts missing tags and excerpts. This powerful tool helps maintain SEO quality and content completeness with just a few lines of code added to your theme or plugin.
How to Detect WordPress Posts Without Tags or Excerpts from the Dashboard
Running a content-rich WordPress site requires maintaining quality, structure, and optimization. One of the often-overlooked elements in content management is ensuring that all posts include tags and excerpts. Tags improve searchability and user navigation, while excerpts help define content previews for feeds and SEO.
In this tutorial, you’ll learn how to build a custom dashboard widget that displays all posts lacking tags or excerpts right from your admin area. This is especially useful for editors and SEO teams managing large blogs with multiple contributors.
Letβs explore why this matters and how to implement the feature step-by-step.
Why Tags and Excerpts Are Crucial in WordPress
Tags Improve Discoverability
Tags allow you to group related content and give users an intuitive way to explore your site. From an SEO perspective, they help crawlers understand your content hierarchy and can support topic clustering strategies.
Excerpts Enhance Previews
Excerpts provide a summary of the post. They are useful in blog listings, RSS feeds, and search snippets. Without excerpts, WordPress may automatically pull in the beginning of your post content, which might not always be ideal.
Missing Metadata Hurts SEO
Search engines rely on metadata like tags and excerpts to understand content relevance. When this information is missing, it could result in lower rankings or poor presentation in search results and social shares.

Use Case: Editorial Teams and SEO Managers
If you have multiple writers on your WordPress site, it’s easy for someone to forget adding tags or excerpts. A dedicated dashboard widget helps quickly spot and correct these posts without running manual searches or using third-party plugins.
Step-by-Step Guide: Custom Dashboard Widget for Missing Tags and Excerpts
Below is the PHP code snippet you can paste into your themeβs functions.php
file or into a custom plugin:
// Step 1: Register the dashboard widget
add_action('wp_dashboard_setup', 'custom_dashboard_no_tags_excerpt_widget');
function custom_dashboard_no_tags_excerpt_widget() {
wp_add_dashboard_widget(
'no_tags_excerpt_posts', // Widget slug
'Posts Without Tags and Excerpt', // Widget title
'render_no_tags_excerpt_widget' // Callback function
);
}
// Step 2: Define the display function
function render_no_tags_excerpt_widget() {
global $wpdb;
$query = "
SELECT ID, post_title
FROM $wpdb->posts
WHERE post_type = 'post'
AND post_status = 'publish'
AND (post_excerpt = '' OR post_excerpt IS NULL)
AND ID NOT IN (
SELECT object_id FROM {$wpdb->term_relationships}
WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM {$wpdb->term_taxonomy}
WHERE taxonomy = 'post_tag'
)
)
ORDER BY post_date DESC
LIMIT 10
";
$posts = $wpdb->get_results($query);
if (!empty($posts)) {
echo '<ul>';
foreach ($posts as $post) {
echo '<li><a href="' . get_edit_post_link($post->ID) . '">' . esc_html($post->post_title) . '</a></li>';
}
echo '</ul>';
} else {
echo '<p>All published posts have tags and excerpts. Well done!</p>';
}
}
What This Code Does
- Hooks into
wp_dashboard_setup
to create a custom widget. - Queries the database directly to find published posts without tags and without excerpts.
- Displays the 10 most recent results.
- Adds clickable titles for quick access to edit and fix the issue.
This solution is lightweight and requires no external plugins. Itβs ideal for performance-focused or minimalist setups.
Enhancements You Can Make
This simple widget can be extended in many useful ways:
- Add filters by author, category, or post date.
- Include drafts or pending review statuses.
- Create separate widgets: one for missing tags, one for missing excerpts.
- Use admin notices or dashboard alerts when the list is not empty.
Plugin Alternative (Optional)
If you’re managing multiple sites and prefer plugin-based solutions, consider creating a small plugin from this code. Wrap it in plugin headers and upload it via FTP or the WordPress admin panel.
Would you like us to turn this into a downloadable plugin? Let us know in the comments!
Keeping your posts optimized with tags and excerpts should be a routine editorial check, especially on larger content-heavy sites. This dashboard widget empowers your team to fix SEO gaps quickly and easily, directly from the admin panel.
It saves time, improves workflow, and ensures every post meets content quality standards before being promoted or indexed.
π© Do you have questions or suggestions? Leave a comment or contact us!
π·οΈ Tags: WordPress admin, SEO tips, WordPress code, dashboard widgets, functions.php, PHP for WordPress, WP dashboard, post optimization, missing excerpts, post tags
π’ Hashtags: #WordPressTips, #WPCustomization, #SEOHelp, #WPDashboard, #PHPCode, #ContentManagement, #WPAdmin, #BlogOptimization, #WPWidgets, #PostMetaFix
Discover more from HelpZone
Subscribe to get the latest posts sent to your email.