Created
March 25, 2015 04:28
-
-
Save liderdesarrollo/3ccbb7c9e7c7a1c21787 to your computer and use it in GitHub Desktop.
obtener el contenido por id del post
This file contains hidden or 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
<div class="post-resume"> | |
<?php | |
$my_postid = get_the_ID();//This is page id or post id | |
$content_post = get_post($my_postid); | |
$content = $content_post->post_content; | |
$content = apply_filters('the_content', $content); | |
$content = str_replace(']]>', ']]>', $content); | |
echo wp_trim_words( $content, 40, '<a href="'. get_permalink() .'"> ...Read More</a>' ); | |
?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment