Archived topic
Displaying single Custom Post type
2 replies · Started by Ashley Bassett on December 5, 2019
Hi - iv'e looked through the support forum and I think I'm after something very simple I can't resolve from the guidance provided there.
I'm migrating my site to this theme - which btw, is fab!
I've added an mu-plugin to register a custom post type - 'portfolio' (to support the custom post type from the previous site). All good!
I use WP_Show_Posts to display the portfolio items as required via a shortcode. Still All good!
However, when I want to view the single portfolio item - I'm having a challenge.
I've copied over the single.php and content-single.php files to my child theme folder.
Changed the name to single-portfolio.php and content-portfolio.php respectively.
Changed the -get_tempalate_part to -get_template_part ('content', 'portfolio') in the single-portfolio.php file.
However I'm getting a 'page can't be found' result.
look forward to any guidance.
Thanks
PS - can't add a site to view as it's a dev site - can provide details but can't put IP in the URL field below.
Please forgive my stupidity. Always the way! it was a permalinks issue.
Feels free to keep / remove this!
Thanks
Ashley
Glad to hear you found the issue and the solution :)