If I change permalinks settings then all post types use that structure. For example:
https://www.domain.dom/blog/%category%/%postname%/
then portolio item resolve as
https://www.domain.dom/blog/portfolio/item/
And I want to remove /blog/ from url when displaying members portfolios, faq, etc.
I found this, but don't know do I need to register new post type, put that in theme functions.php or what to do with that?
Really need some guide on how to achive that.
Thanks
It's easier than you think, add a single php file to the wp-content/plugins directory, add a plugin header comment, then one call to register_post_type(), e.g.:
<?php
/**
Plugin Name: My custom profiles
...
*/
add_action('init', function() {
register_post_type('my_custom_profile', [
'label' => 'Profiles',
...
]);
});