How to change wordpress custom post type permalink to show name of post from another custom post type?

I have post types competitions and class. my adress looks like this example.com/competition/postname/ and example.com/class/postname/ for class. I have metafield in class that shows post id of competition in which this class belongs, and I need to have my permalink for class like this example.com/competition/competitionpostname/classpostname for classes.

Read more here: How to change wordpress custom post type permalink to show name of post from another custom post type?

Leave a Reply

Your email address will not be published. Required fields are marked *