Hello, I know that it is possible to show custom portfolio items by creating page with portfolio template. But is it possible for that page to have slug "portfolio"?
Also if not and for example if I change slug to be "my-portfolio", how to do that when you select portfolio item path would be "/my-portfolio/portfolio-item"? Goal is to have main portfolio page with custom query and keep the slug constant when you enter portfolio item.
There is a solution for your case, this way you need to disable Portfolio archive page which is usually /portfolio so to disable it please add the following code in functions.php (end of file):
// Disable archive for portfolio post type function portfolioposttype_args_disable_archive( $args ) { $args['has_archive'] = false; return $args; }
Hello, I know that it is possible to show custom portfolio items by creating page with portfolio template. But is it possible for that page to have slug "portfolio"?
Also if not and for example if I change slug to be "my-portfolio", how to do that when you select portfolio item path would be "/my-portfolio/portfolio-item"? Goal is to have main portfolio page with custom query and keep the slug constant when you enter portfolio item.
It seems it is not possible.
Hi feelgoodLT,
There is a solution for your case, this way you need to disable Portfolio archive page which is usually /portfolio so to disable it please add the following code in functions.php (end of file):
Then you can name your page slug to "portfolio".The other way is to change the portfolio prefix in theme options:
(view large version)