Hi. Not sure if this was posted successfully, so I’m posting again.
Is it possible to dynamically display the post type in a header element? I have two post types which use the same header and want to dynamically display the post type, i.e. “Case Study” in the header. What Template Tag do I need to add?
Yes, I want to output the actual post type name for a header that serves several distinct custom post types.
Two questions:
1. Is the shortcode you provided going to be more efficient (in terms of page speed and server resources) than creating a distinct header for each post type and just manually writing the post type for each header?
2. Can I add the supplied code as a hook and if so, what would be the best location, i.e. wp_head?
PS I still haven’t quite got my head around what can be added to GP Hooks vs what needs to be added via one of the other methods mentioned above. Is there an easy distinction for a WordPress novice such as myself?