Home Forums General Issues Post Object help Reply To: Post Object help

  • WordPress handles a lot of this for you automatically.

    For your Leadership page that could be the archive template for your Employee custom post type –

    You can say whether or not a custom post type has an archive, and what the URL should be when register the custom post type:

    So if you set your custom post type slug to “employees” and go to it will use the archive template automatically.

    Otherwise you could create a shortcode that does a get_posts on your employee custom post type and display it anywhere.

    For your individual employee pages these are automatically created as well, and use the template:

    So in your single employee template you’ll just need to call get_field or the_field as normal and it will output the values for that specific employee. No need to create a new page and assign employees, as once you’ve created a new employee post it will automatically use this page.