Support

Account

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 – http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Type_Archive_display

    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: http://codex.wordpress.org/Post_Types#URLs_of_Namespaced_Custom_Post_Types_Identifiers

    So if you set your custom post type slug to “employees” and go to http://www.example.com/employees 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: http://codex.wordpress.org/Template_Hierarchy#Single_Post_display

    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.