Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you’re not wanting to mess with changing post_type values on 75 posts, you could try using the rewrite_slug field for the post type, and set that to “games”. It should make the urls use “games” instead.

    Example:

    http://wds.dev/blog/games/test-appgame-mashup/

    Image of admin:
    https://cloudup.com/cBct22Eg0ak

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Forgot to mention you’d potentially need to flush the rewrite rules, but that’s easy to do by visiting the permalinks page without changing any settings.

    Thread Starter WPDragon

    (@wpdragon)

    Thanks for the quick reply….so, just to make sure I understand the process correctly for the existing 75 posts:

    Within the Custom Post Type UI plugin:

    1. Go to the ‘Edit Post Type’ tab (created for ‘apps’).
    2. Scroll down to the ‘Custom Rewrite_slug’ field.
    3. Then, type in ‘games’
    4. SAVE

    Then, go to the wordpress settings – ‘Permalinks’ and just re-save the page?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yeah, those steps look pretty accurate. Would be easy enough to undo as well, in case something is going wrong and need the urls back up asap.

    Thread Starter WPDragon

    (@wpdragon)

    okay cool..I will test that out.

    I just have a couple of more questions:

    What about for adding the relationship to the URL structure…for example: after ‘games’ i want to label the specific gaming console for that particular content.

    • /games —> atari/
    • /games —> nintendo/

    Sorry, im not too familiar with the exact terminology to describe it. 🙂

    I appreciate your help with this.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Customizing the permalinks is the phrasing you’re looking for. That said, we don’t have very much for that built into the plugin since it’s a topic that’s fairly complex, and also not available via the register_post_type() and register_taxonomy functions, which is what we focus on.

    It’s definitely possible as a whole, for what it’s worth.

    Thread Starter WPDragon

    (@wpdragon)

    I tested the ‘Custom Rewrite_slug’ and it worked to replace ‘apps’ to ‘games’…which is a good thing.

    Also, regarding customizing the permalinks for custom post types…I found a plugin that seems to work fairly well & has some positive reviews…

    I just have one other question regarding the ‘Custom Rewrite_slug’ vs. changing the post type slug…I noticed a checkbox that says ‘Migrate posts to newly renamed post type?’..hmm?

    Would you say the custom rewrite_slug a better solution in this case, rather than actually changing and migrating it?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Both are viable options, depending on preference. I chose to suggest this route with the rewrite slug. While I’m confident the convert/rename method is solid and works, there is more to it under the hood, and thus *could* provide more work. Also, any places that rely on post type slugs being used, need changed in those cases. Changing the rewrite slug would not necessitate that. Both versions would require redirects, but only slug renaming requires code re-fiddling.

    Thread Starter WPDragon

    (@wpdragon)

    oh okay, ya that make sense…so, as far as using the rewrite_slug, I assume then this option would be a solid long-term solution, right?

    So, one quick last thing…after I do the rewrite_slug will I also need to do a ‘redirect’ for my existing 75 posts that I published to avoid broken pages that were indexed by Google, correct?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Yes, it’d be a long term solution. It’s not something unique to CPTUI, it’s been part of WordPress core for a long time.

    Technically, yes, you would need to do a redirect, at least if WordPress doesn’t detect it and do its best to redirect for you. It does try its best to, but doesn’t always succeed. It’d be a pretty easy RedirectMatch as well, for what it’s worth.

    Thread Starter WPDragon

    (@wpdragon)

    oh okay, great. Thanks for all your help & quick replies.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Changing Custom Post Type Structure…please help.’ is closed to new replies.