Wordpress newbie, here.
I've created a custom post type, using CPT UI, named "menus". Later created single instances of that "menus" CPT, directed by a "single-menu" template.
So here's my hierarchy for that "menu" CPT:
one template "menus" : listing all "menu" posts one template "single-menu" : generating individual posts of the "menu" post type various pages based on the "single-menu" template : for example, a "monday" page Now, i want to retrieve this "monday" single instance of that CPT and re-use its code using get_template_part().
So far, i've been able to call the CPT listing page content ("menus") but unable to call the single instance ruled by the "single-menu" template. Here's my code:
<?php
get_template_part( 'menus');
?>
The path for the page targeted reads as follow on my browser:
http://localhost/website/menu/monday/
I've tried several combinations but have been unable to call it. New to wordpress as mentioned, used to use a standard php include function in my static prototype. It worked fine, now how i can call this "monday" with the get_template_part()?
Any idea as to how this could be done? Pointers welcome too!