mgsisk / webcomic

Comic publishing power for the web. Turn your WordPress-powered site into a comic publishing platform with Webcomic.
http://wordpress.org/plugins/webcomic
GNU General Public License v2.0
110 stars 29 forks source link

Quick question about %postname% #150

Closed muge closed 11 years ago

muge commented 11 years ago

I'm not quite familiar with how all this github business works, but here we go, haha.

To start, I'm running on Inkblot 4.0.2 (latest I believe) and Webcomic 4.0.9.1. Fairly impressed with how all this works, but I am running into a small problem. Under the settings for a webcomic collection, we're given options for permalinks, with four fields, Archive, Webcomics, Storyline, and Characters.

For my webcomics, I would like to have a sequential order in the permalink, such as "examplecomic.com/webcomic/page-456/", where the post title is "Page 456". I figured this would be fine and dandy if I just input "/%postname%/" into the Webcomic field, but afterwards it just sets the value as just "/postname/" so that the permalink becomes "examplecomic.com/webcomic/postname/?p=45", where 45 is the %post_id% for example. I looked in the area where you discussed creating custom permalinks, and I noticed that %postname% wasn't included in the list? Of course, I could just manually set the permalink with each webcomic post, but automation is nice.

I'm pretty user-end and not that familiar with the inner workings of Wordpress, let alone PHP (if that's what it uses), so bear with me if I'm missing something basic.

Thanks, muge

mgsisk commented 11 years ago

Assuming you have WordPress' "pretty" permalinks enabled (make sure something other than Default is selected on the Settings > Permalinks page) what you describe is actually the default WordPress behavior; you don't have to change anything for that to happen. If you're seeing URL's like ?p=### I'm thinking "pretty" permalinks probably aren't turned on.

For a little more explanation: in WordPress, custom post types always have a "pretty" URL that's your site url, a prefix (which is what you can customize on collection settings pages), and then the post slug. So without making any changes, a "pretty" URL to a Webcomic post titled Page 45 should look like:

http://mywebcomic.com/webcomics-permalink-setting/page-45

You can customize the webcomics-permalink-setting bit (with regular text or the tokens described in the Beginner's Guide), but the post slug will always be included at the end. This is why %postname% isn't an option for Webcomic posts: WordPress always automatically includes it.

muge commented 11 years ago

Ah, yeah that helped - error on my part I guess. Was looking in the wrong place, haha. Thanks!