title: Show only specific categories in permalinks for custom post type in WordPress
body: <p>I tried to ask this question in the Wordpress Devlopment network with no success, I'm trying to display only 3 specific categories in permalinks for custom-post-type categories.</p>
  
  <p>Right now the permalinks structure (that is the structure given by <a href="https://themeforest.net/item/recipe-wp-theme-for-recipes/10600852" rel="nofollow noreferrer">the theme i'm using</a> and that i'm modifying through a child theme)is as follows:</p>
  
  <pre><code>www.myfoodblog.com/recipes/the-post-title/
           ^            ^           ^    
         root   custom-post-type  title  
  </code></pre>
  
  <p>some post are under 3 categories that i would like to display in permalinks which are <code>restaurant</code>, <code>users</code> and <code>admin</code> to get something like this</p>
  
  <pre><code>www.myfoodblog.com/recipes/restaurant/the-post-title/
  
  www.myfoodblog.com/recipes/users/the-post-title/
  
  www.myfoodblog.com/recipes/admin/the-post-title/
  </code></pre>
  
  <p>leaving the original structure for posts that are not in those categories.</p>
  
  <p>I tried using <a href="https://wordpress.org/plugins/permalinks-customizer/" rel="nofollow noreferrer">this plugin</a> but it will display the custom post type category for all posts.</p>
  
  <p>I also tried to follow the instructions provided in <a href="https://stackoverflow.com/questions/11024040/getting-wordpress-to-automatically-show-category-permalink-for-only-specific-cat">this question</a> but it's not working, no changes are made in the permalinks structure.</p>
  
  <p>Any advice is much appreciated.</p>