• Hi,

    on my website i have two types of custom post types

    1. Coupons
    2.Stores

    i want to add coupons as a child of the stores post type and also change the structure of url of coupons to sitename/storename/couponttitle

    how can i do it

Viewing 4 replies - 1 through 4 (of 4 total)
  • Here’s a post that could get you started:

    http://wordpress.stackexchange.com/questions/128622/creating-a-relationship-between-two-post-types

    I had a similar issue with adding “hierarchy” (parent-to-child, 1-to-1) to university courses and programs. I think what might help you to consider “hierarchy” as a form of “relationship.”

    From a strategic standpoint, this approach may help you down the road in the event that a single coupon works across multiple stores (say the store has multiple locations or that the coupon could work a various different brands).

    I personally used ACF to solve the problem mentioned above, it worked great.

    Thread Starter androidw

    (@androidw)

    how do you use ACF can you tell me i have been stuck at it for a week and i am not so good in programming.

    Thread Starter androidw

    (@androidw)

    ohk i have created the relationship how do i add it to the permalink structure

    If I remember right, you may need to have WordPress “rebuild” permalinks for it to appear.

    It’s real easy to do: Go to Settings > Permalinks and save whatever setting you already are using (unless you want to change something else as well).

    On save, WordPress will very quickly rebuild the permalinks. That should add your custom post type to the structure if I remember right.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add a custom post type as child for another custom post type?’ is closed to new replies.