i'm having a problem and i can't seem to figure out how to solve it. I'm just beginning to develop custom themes in wordpress and i wanted to create the custom template for portfolio and a single page for every single work in the portfolio.

the single-portfolio.php works fine but the page-portfolio.php loads the index instead. i tried setting the template in the builder but it doesn't work.

For the single-portfolio i am using a custom cpt i built where i can add new works just as i wold add a blog post and that seems to work just fine.. it just doesn't want to load the page-portfolio.php

1 Answer 1


I found the problem.. when creating the custom post type i set the argument "has_archive" to true and that was causing a conflict so my page-portfolio.php was not loaded. Also had to change the slug of the custom type field because it had the same slug as the page, so both of them were "portfolio".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.