[theme-reviewers] Posts without Titles
Chip Bennett
chip at chipbennett.net
Wed Apr 20 21:18:48 UTC 2011
That works (and is actually what I use personally), but some Theme
developers may not want anything to display in place of the Post Title if
none is provided. Doing so is certainly acceptable, but does not negate the
requirement to provide a link to the single-post view.
Note that the developer doesn't *have* to use the Post date/time stamp for
this link. The developer can use whatever he wants - so long as the link is
provided.
Chip
On Wed, Apr 20, 2011 at 4:15 PM, Philip Walton <philip at philipwalton.com>wrote:
> Right, I get that. I guess perhaps it's more an issue of why WordPress
> allows you to publish a post without a title in the first place. It seems to
> me that posts without titles have bigger problems than whether or not a user
> can get to them.
>
> Actually, as I'm writing this email, Emil posted a solution on the trac
> ticket that i really like:
>
> /**
> * Where the post has no post title, but must still display a link to the
> single-page post view.
> */
> add_filter('the_title', 'blank_slate_title');
>
> function blank_slate_title($title) {
> if ($title == '') {
> return 'Untitled';
> } else {
> return $title;
> }
> }
>
>
> This way you don't have to include an extra link if you don't want to.
>
> Thanks, Emil!
>
>
>
> On 4/20/11 1:58 PM, Chip Bennett wrote:
>
> Because the user needs to have *some* way of reaching the single-post view.
>
>
> Chip
>
> On Wed, Apr 20, 2011 at 3:55 PM, Philip Walton <philip at philipwalton.com>wrote:
>
>> A user, in response to a rejected them, posed this question re: smgrundy's
>> review:
>>
>> Cannot access single-page views of posts without titles from the index.
>> -> That's good, consistent and how I want it throughout the site. Is this
>> mandatory?
>>
>> I've wondered the same things as well. It's always seemed a little odd to
>> me to have the post date link to the post itself. Personally I think the
>> date should link to a date page. I know there are other ways to create a
>> title-less permalink, but this is the most common.
>>
>> Still, what is the rationale behind requiring posts with no titles to have
>> a permalink to them?
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>
>
> _______________________________________________
> theme-reviewers mailing listtheme-reviewers at lists.wordpress.orghttp://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110420/8815439e/attachment.htm>
More information about the theme-reviewers
mailing list