image flash

Auto Post Title

A WordPress Plugin by ThoughtLab

March 16th, 2011

There are times when you want to automatically include information into the title of a post, page, or custom post type. This plug-in adds an item to the Admin Settings menu called “Title Format.” Clicking on this link will give you an options page where you will find a text field for each post type that you have registered in WordPress, including Post and Page. In these text fields, you are able to use shortcodes to build a title format that will be used to generate the title of all posts of that type. For example, say I had a blog with several authors, and I wanted to include the author’s name into the title of every post. I could use something like:

Post Title

[title] - by [author]

So, if I had a post by John Smith, with a title of “An Excellent Post,” the title would be displayed as: “An Excellent Post – by John Smith”

Another example:

I might have a website which uses custom post types to catalog my inventory of cars for sale. My ‘cars’ post type will be displayed in the Auto Post Title options page as ‘Cars Title.’
Assuming that I have already set up my cars with a year, make, and model as meta data, I would then enter something like this:

Cars Title

[year] [make] [model] For Sale!

Each of my cars will then be shown with a title similar to: “2011 Chevy Camaro For Sale!”

  1. id
  2. title
  3. author
  4. date (use the attribute: format=”" to format date. Click Here for formatting info.)
  5. modified (also takes the format=”" attribute.)
  6. content
  7. excerpt
  8. status (published, draft, etc.)
  9. type (the post type)
  10. name (the post slug)
  11. comments (show number of comments)

Go take a look!


6 Responses to "Auto Post Title"
Will says: March 23rd, 2011 at 4:15pm

Like the plugin, but need some help.

First, it has added the same data to all of my menu items. Not so cool. Can I have this ONLY apply to post titles?

Also, how can I modify the size of text. e.g. [title] font size 12, while “by [author]” font size 8

Thanks!


dgodfather says: March 29th, 2011 at 6:36pm

The Auto Post title is overriding my menu @

http://profaneentertainment.com/league/?match=test-vs-fragweiser

Any thoughts?


Jesse says: April 5th, 2011 at 6:21pm

Hi great plugin, thanks for sharing. One request, would it be possible to spin the content like:

{For Sale|For Sale Now}

So it would randomly choose between the two in order to give some variation.


Lance Miller says: September 22nd, 2011 at 11:07am

@WILL:
You can use HTML in your format, and then use CSS to style it. For example:

[title] — [author]

And then set your CSS:

.author{
font-size:8px;
}

That should do the trick.


Lance Miller says: September 22nd, 2011 at 11:08am

@DGODFATHER:

This should be fixed with the latest update. Make sure you have the latest version.


Lance Miller says: September 22nd, 2011 at 11:09am

@JESSE:

That’s a great idea. I will try to get that into the next update.