Last active
May 10, 2020 10:26
-
-
Save Oscar-Abad-Folgueira/720f1c198b689f86ec133f14f85473f9 to your computer and use it in GitHub Desktop.
Obtener el contenido de cualquier post en WordPress
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 | |
/** | |
* @snippet Obtener el contenido de cualquier post en WordPress para mostrarlo por código | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://www.oscarabadfolgueira.com/obtener-el-contenido-de-cualquier-post-en-wordpress/ | |
*/ | |
$page_shortcodes_postid = get_post( 2607 ); // obtenemos el post con ese id | |
$page_shortcodes_content = $page_shortcodes_postid->post_content; // obtenemos el contenido de ese post | |
echo $page_shortcodes_content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment