Opened 8 years ago
Last modified 7 years ago
#39599 new enhancement
Customizer: when no title on page it adds weird content in navigation link
Reported by: | karmatosed | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Customize | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Attachments (5)
Change History (17)
#1
@
8 years ago
- Summary changed from Customizer: when no title on page it adds weird content to Customizer: when no title on page it adds weird content in navigation link
#3
@
8 years ago
@Presskopp
Depends on which type of user is seeing that in the customizer. It is not directly obvious that it is the post id then displaying no title. Or does it make sense to make post or page title be required to be able to save either?
#4
@
8 years ago
I don't know what's the perfect solution. I assume the easiest way would be forcing the user to enter a name for any post/page - so we don't need to worry about such anymore (What's the benefit of having a nameless post besides testing purposes?). But as long as we do, here some possible permutations:
ID:20 (no title)
ID:20 (untitled)
(no title, ID:20)
(no title) [ID:20]
...
We could also display a helping text when an untitled post/page is detected - see screenshot
Better ideas welcome! :)
#6
in reply to:
↑ 2
@
8 years ago
Replying to Presskopp:
This is coded as
'#%d (no title)'
and we have 7 occurences in 5 files.
Related:
#7
@
7 years ago
Here's a patch, see screenshots please. Still needs agreement on the wording and would need version comment in function _draft_or_post_title of template.php
#11
@
7 years ago
I'm not sure the post ID would help so much the average user. It might be useful in the admin/Customizer context but advanced users would already know how to retrieve the post ID. As a site owner, probably I wouldn't want to see that number on my front-end.
Worth noting #35709 just removed the post ID number from the Recent Posts widget, which is now displaying just (no title)
. @westonruter any thoughts?
#12
@
7 years ago
Given that this is an admin context, it makes more sense for an ID to be shown. But it would be even better if we grabbed the first few words of the excerpt or content to use as the snippet. In fact, that would probably be what we should do for #35709 as well. This is essentially what O2 does: https://github.com/Automattic/o2/blob/007c733/inc/write-api.php#L93-L94
This is coded as
'#%d (no title)'
and we have 7 occurences in 5 files. The#%d
is the ID of the post. It's not so weird to me, but maybe we should replace#
byID:
. If we'd just cut it, what if there are more untitled posts?