Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

the_excerpt() vs the_content() and stripped tags in views and templates

$
0
0

Hi!
First question: Is there a way to use the_content() template tag instead of the_excerpt() template tag when listing posts in a view? I have no need at all for the excerpt with a number of letters or words. Maybe create a shorttag to be able to display a list of posts with the content of the posts preceeding the <–more–> tag.

(refering to this: https://codex.wordpress.org/Excerpt; "… relationship between the three is this: When a post has no manual excerpt and the post template uses the the_excerpt() template tag, WordPress generates an excerpt automatically by selecting the first 55 words of the post. When the post template uses the the_content() template tag, WordPress will look for the More tag and create a teaser from the content that precedes the More ….")

Second question: how to include the tags from the post (p, br, img etc)? When i display a postcontent from a content template created in views or a list of posts from a view all the tags are stripped, no p-tags or images are showing. How to correct that?

//Björ


Viewing all articles
Browse latest Browse all 20145

Trending Articles