I have a blog posts at “domain.com/blog/” using the permalink Custom Structure in WP “/blog/%postname%/”. I am also using the Enfold portfolio Post Type at “domain.com/portfolio/” using the Portfolio Items Base “portfolio”. By default, WP is creating “domain.com/blog/portfolio/”. Since I don’t want “portfolio” as a child of “blog” in my permalink, I fixed it the following way…
I have changed “with_front” to “false” in the following file, “includes\admin\register-portfolio.php” to fix this. But, my updates are naturally overwritten with each Enfold update since it is not in the Child theme. Is there a better way to handle this in the Child “functions.php” file or somewhere else? My code is below. Login below.
Line 37
‘rewrite’ => array(‘slug’=>_x($permalinks[‘portfolio_permalink_base’],’URL slug’,’avia_framework’), ‘with_front’=>false),
Line 57
“rewrite”=> array(‘slug’=>_x($permalinks[‘portfolio_entries_taxonomy_base’],’URL slug’,’avia_framework’), ‘with_front’=>false),
Thank you in advance!
Hey gregorh,
You can move all the code of the post type creation to functions.php of your child theme and you can overwrite this.
You can check for more details here: https://wordpress.stackexchange.com/questions/65075/use-register-post-type-to-modify-an-existing-post-type
Best regards,
Basilis