• Resolved Nik Berezkin

    (@nberiozkin0616)


    Hi there,

    Hoping I could get some help with an issue I’m having with setting up a custom taximony setting on your plugin. I tried configuring this a few different ways and nothing seems to be working for me.

    Basically, I have a custom post type for “airport car services” I also have a custom post type for “airport car service rates”, and I’m trying to create a hierarchical permalink structure that will be reflected in nav breadcrumbs that will help users navigate the site.

    The “car service” post types are displayed as follows:
    https://blueskylimovail.com/car-service-rates/vail/

    and the rates are currently as such:
    https://blueskylimovail.com/car-service-rates/vail/

    But I what I would really love to do is to be able to force the permalink structure of rates to display as such:

    https://blueskylimovail.com/locations/vail-denver-car-service/rates

    and I believe I should be able to somehow set this up with a custom taximony, but I just can’t seem to force /rates/ to be a child of the of the /locations/ category, following the “car service” custom post type.

    Is this even possible to do in WordPress?

    Really hoping somebody can help me out here.

    Thank you so very much.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author wpexplorer

    (@wpexplorer)

    Hi,

    This is AJ the plugin author. Thank you for your patience.

    Looking at this URL: ?https://blueskylimovail.com/locations/vail-denver-car-service/ – I see that this post is using a post type named “rank_math_locations” where /locations/ is your post type archive (honestly the name of that post type is a bit weird, rank_math_ is an SEO plugin, idk why it has been added to the custom post type name…)

    Then this URL: https://blueskylimovail.com/car-service-rates/vail/ – is another post type named “car-service-rates”.

    And it sounds like you somehow want to “connect” both of them, which is not possible since they are both post types there wouldn’t be any sort of association between the two.

    Essentially what you would want to do is convert car-service-rates into a Taxonomy so it’s not a custom post type, this way you can assign the rates to your different car services (just like you would assign categories to posts).

    Then you can insert the category term into the URL with some custom code (since it’s not a native WP function). I actually have an example of how to do something like that here (this snippet is based on a built-in post type so you can ignore the first part of the snippet – since you can just modify your post type slug via the admin using this plugin). And I would be more then happy to write some custom code for you that will work for your specific case, but currently your site isn’t setup for this so I can’t provide this. You would need to setup your taxonomy and let me know what the taxonomy name is.

    Now, if you want to connect 2 post types and not create a taxonomy, it is of course possible but it’s not really the standard way of doing things and is a bit complex. This would be done using custom fields and then insert the custom field value into the URL.

    And of course there is always the manual way by editing your slug manually to add the rate into the URL every time you publish a post (which I wouldn’t recommend).

    So… The best solution is to create a taxonomy for rates so you can then organize your car services by rates. Then these pages – https://blueskylimovail.com/car-service-rates/vail/ – would essentially be your taxonomy archive pages, so by default they will want to display the posts assigned to them. But it looks like you want to have custom page designs instead (which I am assuming is the reason you went with a post type and not a taxonomy) – So depending on the theme you are using you would either need to use a child theme to modify the output of these pages, create standard pages for them and add redirections or if your theme supports creating custom templates for the archives do that.

    • AJ
Viewing 1 replies (of 1 total)
  • The topic ‘Help with custom taximony setup’ is closed to new replies.