TAG: Code Examples

WordPress: One Way To Display The Perfect Title

While the work has been sometimes laborious to get this blog finished and ready to view, one of the more difficult things was to get the details right in the <TITLE> tag. Many of the snippets of code out there suggest using various separators and little tricks to determine if the user is at the home page. What I was after was this:

If at the home page, display the blog’s name and description only. If on an article, display only the title of that article. The resulting code is a mix of php snippets found all over the web but one great way to make the links a search engine provides look better.

There are no more results.