Wordpress custom post permalink structure inside custom post permalink -


i have custom post structure this:

mysite.com/custompostname/customposttitle

and need have 1 more custom post type have depedency myfirst custom post type permalink be:

mysite.com/custompostname/customposttitle1/custompostname2/custompost2title1 mysite.com/custompostname/customposttitle1/custompostname2/custompost2title2

mysite.com/custompostname/customposttitle2/custompostname2/custompost2title3 mysite.com/custompostname/customposttitle2/custompostname2/custompost2title4

etc..

i have news section custom posts in permalink, example:

mysite.com/companies/company1/news/news1

is there way achieve this?

you can customise permalink custom post type, needs hardcoded in rewrite parameter given register_post_type. use categories achieve same thing though: set taxonomy first custom post type , use posts create custom taxonomy second cpt (i.e. posts first cpt become categories second).

so add pseudo-code edit page second cpt:

  1. get posts of type 'cpt1'
  2. loop through them create list of checkboxes
  3. display in metabox
  4. save result

there still hoops jumped through urls going right place, it's start.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -