p.s. that function should be prefixed with theme-slug, and the conditional should be written in "Yoda" casing:<div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>if ( '' == $title )</div></blockquote><div><br></div><div>rather than</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>if ( $title == '' )</div>
</blockquote><div><br></div><div>;)</div><div><br></div><div>Chip<br><br><div class="gmail_quote">On Wed, Apr 20, 2011 at 4:15 PM, Philip Walton <span dir="ltr"><<a href="mailto:philip@philipwalton.com">philip@philipwalton.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#ffffff" text="#000000">
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.<br>
<br>
Actually, as I'm writing this email, Emil posted a solution on the
trac ticket that i really like:<br>
<pre>/**
* 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;
}
}
</pre>
This way you don't have to include an extra link if you don't want
to.<br>
<br>
Thanks, Emil!<div><div></div><div class="h5"><br>
<br>
<br>
On 4/20/11 1:58 PM, Chip Bennett wrote:
<blockquote type="cite">Because the user needs to have *some* way of reaching
the single-post view.
<div><br>
</div>
<div>Chip<br>
<br>
<div class="gmail_quote">On Wed, Apr 20, 2011 at 3:55 PM, Philip
Walton <span dir="ltr"><<a href="mailto:philip@philipwalton.com" target="_blank">philip@philipwalton.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">A user, in response to a rejected them,
posed this question re: smgrundy's review:<br>
<br>
Cannot access single-page views of posts without titles from
the index.<br>
-> That's good, consistent and how I want it throughout
the site. Is this mandatory?<br>
<br>
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.<br>
<br>
Still, what is the rationale behind requiring posts with no
titles to have a permalink to them?<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
</blockquote>
</div>
<br>
</div>
<pre><fieldset></fieldset>
_______________________________________________
theme-reviewers mailing list
<a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
</div></div></div>
<br>_______________________________________________<br>
theme-reviewers mailing list<br>
<a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br></blockquote></div><br></div>