0
votes

I need the links of all personalized posts and taxonomies to be structured with the name of the category (s) they belong to. Unfortunately the theme used for my site generates a new type of post and the new taxonomy programmatically and performs the rewrite of their permalink.

To solve this problem I configured the "Custom Post Type Permalinks" plugin which works, but only halfway: - the permalinks of taxonomies are generated correctly and are accessible from the site. - the permalinks of the posts are generated correctly, but are not accessible from the site and return a page with a "404 Page not found" error.

In my httpd.conf the line LoadModule rewrite_module modules/mod_rewrite.so is not commented.

What can I do?

1
After use the "Custom Post Type Permalinks" plugin please set the permalink and check again. - PPL
Hi PPL, thank you for your replay. Unfortunally I've tried to set the permalink without no results. - skylab

1 Answers

0
votes

let me give you a deeper idea about what we’d like to get. We would really appreciate if you could help us reaching it, by letting us know where to operate.

We would like all the tours’ url to be made up like this: www.sitename.com/$category_father/$category_child/$name_of_my_post Moreover, we would like all the tours’ taxonomies url to be made up like this: www.sitename.com/$category_father/$category_child

At the moment your Tourmaster plugin creates the taxonomies and the tours as below:

www.sitename.com/tour/$name_of_my_post
www.sitename.com/tour-category/$category_child

In order to avoid editing the plugin code and prevent any updates conflicts we installed the plugin “Custom Post Type Permalinks”. It partially solves the taxonomies problem and partially the tours one, generating almost correct urls which are unfortunately not reachable.

www.sitename.com/tour/$category-father/$category_child/$name_of_my_post www.sitename.com/tour/tour-category/ $category_father/$category_child

Referring to the readme.txt file within www.sitename.com/wp-content/plugins/custom-post-type-permalinks/ we could notice the following example code.

register_post_type( 'foo',
   array(
   "public" => true,
   'has_archive' => true,
   "rewrite" => ["with_front" => true],
   "cptp_permalink_structure" => "%post_id%"
) );

So we edited the Tourmaster plugin code replacing the rewrite array within the file www.sitename.com/wp-content/plugins/tourmaster/include/tour-option.php with the array [“with_front” => true], but we did not get any result. When you saw the url working, it was due to a temporary reset of the CPTP settings.