Results 1 to 2 of 2
Thread: Post description excerpt.
Sep 12, 2013, 14:41 #1
Post description excerpt.
I would like to get an excerpt of the text in my visual editor and put it into a template. What I have is a search results page and I would like excerpts of the description text to appear here. The code that I have is:
<?php echo $property['i dont know the variable']; ?>
As stated above, I do not know what variable to put there. I can't use post_content because it will display everything on my page including the photos on it (as it should if using that code). I just want the description text.
I tried using post_excerpt but that appears empty on the page I need my text on because I assume something isn't being called.
Sep 18, 2013, 19:16 #2
- Join Date
- Sep 2013
- 1 Post(s)
- 0 Thread(s)
Have you tried this?
<?php echo wp_trim_words( get_the_content(), 25, '...' ); ?>