How to get post type of ANOTHER post
-
I have a filter to change the title of posts. I used get_post_type() to apply it only to post types. However, this gets the post type of the current page, not the page whose title I want to change.
This is a problem on the front page, where I have featured pages (not post type) and recent posts (is post types). It’s also a problem on the menu, which links to pages that aren’t post type. But if, for example, I’m on a page of type post, the titles of the menu pages will also be altered.
How do I set the conditional to get the post type of the target post, and not the page that I’m currently on?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to get post type of ANOTHER post’ is closed to new replies.