Auto Post Title
[resolved] changing permalink (6 posts)

  1. thatwastaxing
    Posted 5 years ago #

    I'm using your plugin to display users' names in the title field automatically in a custom post type, using the [author] code.

    I've removed support for a title field in the custom post type to prevent users from typing in anything there at all.

    This works well but the permalink generated is "http://localhost/testsite/testcpt/auto-draft/"

    I'd like it to be "http://localhost/testsite/testcpt/display-name/"

    Can I do that with your plugin?


  2. ThoughtLab
    Plugin Author

    Posted 5 years ago #

    You should be able to open up the "Screen Options" at the top of the edit page and check the box that says "Slug." You should be able to type in the slug for your custom post in that box. Please let me know if that doesn't work.

  3. thatwastaxing
    Posted 5 years ago #

    Hi. Yes, I'm able to change the slug that way but what I'm after is a way to change it from saying "auto-draft-x" and taking the value of [author].

    Looking at my database, all the records have a value of "auto-draft" rather than "publish" (except for Hello World! and Sample Page, of course).

    Perhaps this is beyond the scope of your plugin and something I should be investigating in WP itself?

  4. ThoughtLab
    Plugin Author

    Posted 5 years ago #

    We could set the slug dynamically with the title, but that would cause problems with permalinks and SEO. If anything changed, then the URL would become obsolete. If you set the slug yourself, then you can set it to whatever you want, and it will work as long as you don't change the slug.

  5. thatwastaxing
    Posted 5 years ago #

    Thanks for looking into this.

    It seems that publishing without a title (custom post types) is indeed a WP limitation and the solution is to pre-populate the title field before saving so that it is set.

  6. Justin Sternberg
    Posted 4 years ago #

    Did you figure out the best way to pre-populate the title field?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Auto Post Title
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic