Last active
July 18, 2022 18:07
-
-
Save someguy9/51764538dd229742c6992f02940718fc to your computer and use it in GitHub Desktop.
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 | |
// Display post title using post ID | |
echo get_the_title( 5 ); | |
// Display post title and safely escape value | |
echo esc_html( get_the_title() ); | |
// Using the_title function to automatically echo the title, while you can append or prepend the title using the function as displayed below | |
the_title( 'Before:', ' - After' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment