Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist for my article WordPress: Access post meta fields through WP_Post. https://vanaf1979.nl/wordpress-access-post-meta-fields-through-wp-post/
<?php
echo $post->page_template; // The page template for this post.
print_r( $post->post_category ); // Categories associated with this post.
print_r( $post->tags_input ); // Terms associated with this post.
print_r( $post->ancestors ); // Ancestors for this this post.
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.