Post Type Archive Descriptions
Enables an editable description to display on post type archive pages. Show the description with WordPress's the_archive_description() function t …
Next Milestone 2K
Unlock Exact Install Count
See the precise estimated active installs for this plugin, calculated from real-time ranking data.
- Exact install estimates within tiers
- Track install growth over time
- Milestone progress predictions
Rank Changes
Downloads Growth
Upgrade to Pro
Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.
Upgrade NowReviews & Ratings
Tracked Keywords
Showing 0 of 0| Keyword | Position | Change | Type | Updated |
|---|---|---|---|---|
| No keyword data available yet. | ||||
Unlock Keyword Analytics
Track keyword rankings, search positions, and discover new ranking opportunities with a Pro subscription.
- Full keyword position tracking
- Historical ranking data
- Competitor keyword analysis
Track This Plugin
Get detailed analytics, keyword tracking, and position alerts delivered to your inbox.
Start Tracking FreePlugin Details
- Version
- 1.5.0
- Last Updated
- Oct 20, 2023
- Requires WP
- 4.6+
- Tested Up To
- 6.3
- PHP Version
- N/A
Support & Rating
- Rating
- ★ ★ ★ ★ ★ 5
- Reviews
- 6
- Support Threads
- 0
- Resolved
- 0%
Keywords
Upgrade to Pro
Unlock keyword rankings, search positions, and detailed analytics with a Pro subscription.
Upgrade NowFrequently Asked Questions
Common questions about Post Type Archive Descriptions
How do I display a custom post type's description?
Use the_archive_description() or get_the_archive_description().
Chances are you want this in the archive-{post_type_slug}.php or archive.php template files.
As of v1.3.0 of this plugin, the archive description is automatically added to The Events Calendar archive pages using the plugin's latest design.
Which post types get a description?
By default, any custom post type excluding Posts and Pages that was registered with 'has_archive' => true. There is a filter (see below) to add support for any post type.
How do I set up an editable description for my Blog / Posts?
Since this plugin does not support descriptions for Posts or Pages, I recommend a different approach.
First make the blog page (aka the "Page for Posts") editable with this snippet in functions.php or an mu-plugin:
add_filter( 'replace_editor', 'ptad_enable_gutenberg_editor_for_blog_page', 10, 2 );
/**
* Simulate non-empty content to enable Gutenberg editor on the Blog page
*
* @param bool $replace Whether to replace the editor.
* @param WP_Post $post Post object.
* @return bool
*
* @see https://wordpress.stackexchange.com/a/350563/9844
*/
function ptad_enable_gutenberg_editor_for_blog_page( $replace, $post ) {
if ( ! $replace && absint( get_option( 'page_for_posts' ) ) === $post->ID && empty( $post->post_content ) ) {
// This comment will be removed by Gutenberg since it won't parse into block.
$post->post_content = '<!--non-empty-content-->';
}
return $replace;
}
Then output that content on the blog page with the home.php template:
echo '<div class="archive-description blog-description">' . apply_filters( 'the_content', get_the_content( null, false, (int) get_option( 'page_for_posts' ) ) ) . '</div>';
ptad_post_types - specify the post types with a description (default is all non-built_in post types where has_archive is true)
ptad_admin_title - Modify admin page title
ptad_admin_parent - Change parent page of the Description edit page
ptad_menu_label - Modify the menu item label in the admin
ptad_description_capability - Set capability of who can edit descriptions. Default: edit_posts
ptad_edit_description_link - Modify admin bar link to edit the description
ptad_view_archive_link - Modify admin bar link to view the post type archive
ptad_tribe_template_before_include - Modify which The Events Calendar template part the description should appear before, or false to disable automatic output.
Actions:
ptad_before_editor - Between title and description editor for ALL admin pages. Receives $post_type arg.
ptad_before_editor_{post_type} - Between title and description editor for any specific post type.
ptad_after_editor - Immediately below description editor for ALL admin pages. Receives $post_type arg.
ptad_after_editor_{post_type} - Immediately below description editor for any specific post type.