May 10, 2015 at 8:38 pm #151621PorterParticipant
Generally speaking, I've read to only use a custom post type if it's unique enough to warrant doing so. I'm considering creating an "Articles" CPT, though it's extremely similar to "posts", here's my pros and cons list.
-Admin menu name will be "Articles" (I know I can change this with some PHP)
-Url structure will be site.com/articles/the-article-title (desired)
-Gets rid of tags, default archives, etc - I don't need any of this clutter, and won't be using it (articles are a small bit of the site).
-Can leave the permalink structure as %postname% rather than %category%/%postname% (I feel this is better, confirm?)
-They're so similar (not a big deal, but worth noting)
-A bit more code in my site-specific plugin
While I know it's generally only worth doing if it's different, can anyone chime in on why I should or shouldn't create this CPT? Not having the tags and archives (default archives, I'll be creating my own page / template) is a decent plus to me, though not a big deal. I'm under the impression that keeping the permalink structure simple at %postname% is beneficial, even if not now, or never significantly (I sort of feel like conflicts are easier the more complicated it gets). Any thoughts?
May 10, 2015 at 8:52 pm #151626ChristophMember
I would say it doesn't make much of a difference whether you adjust posts to fit your needs or create an Articles CPT.
The impression I´m getting is that you would prefer to have a CPT but are not sure if you are following "proper protocol".
That´s the beauty of open source. You can (almost) do whatever you want.
The simple %postname% structure is easier to read and if you are not planning on creating a lot of content that would benefit from the additional structure, you don't really need it.
Just my two cents 😉
May 10, 2015 at 8:55 pm #151627PorterParticipant
That's exactly what I was hoping I would hear 🙂
As you guess, I wanted the new CPT, but wasn't sure if was breaking any fundamental "rules". I seem to understand them just fine though, and "breaking" them (if it can even be called that), does no harm, so I think I'll do it. I've already adjusted the Admin Menu, so I'll simply hide posts and replace the position with "Articles". This will be slightly neater if I decide to use Advanced Custom Fields to add any content to those articles in the future as well.
Thanks for the quick clarification 🙂
May 10, 2015 at 9:05 pm #151628
- The topic ‘Replace "Posts" With Custom Post Type’ is closed to new replies.