-
-
Save deckerweb/d03269e18c567d153251e39cb9b5072d to your computer and use it in GitHub Desktop.
Use the get_post_field() function to get any of the wp_posts column fields #wordpress #php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo get_post_field('post_content', $post_id); // retrieve content | |
echo get_post_field('post_name', $post_id); // retrieve the slug | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment