Opened 2 years ago
Last modified 2 years ago
#16784 new enhancement
Introduce post_type_archive_description() — at Version 4
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Post Types | Version: | 3.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by scribu)
if using the standard archive.php page, the common function for getting archive page name (e.g. single_tag_title) or description (e.g. tag_description) do not work - the best now is to use get_queried_object()->name resp. get_queried_object()->description
Also it is not obvious, that when you create a custom post type and taxonomy (with public=true) they are not visible on menu navigation page - you must make them visible using the top View menu (it took me a while to realize it)
Change History (4)
comment:1
in reply to:
↑ description
duck_ — 2 years ago
- Keywords close added
sorry, have not noticed #16075. Ad (2) - the post_type_archive_title is great, i have missed it and is probably exactly what i thought, what should be added then is also post_type_archive_description function.
- Summary changed from Custom post type archive limited to Introduce post_type_archive_description()
post_type_archive_description() would require a place to store the description in the first place. Maybe a 'archive_description' arg on register_post_type() ?

Replying to thomask:
#16075
post_type_archive_title. There is no way that single_tag_title is supposed to work as it is clearly for use with tag archives. You can also use is_post_type_archive to determine if the current page is a post type archive.
Suggesting close as dupe of #16075 for the first problem.