N
N
Nikita Naumov2015-03-03 18:57:59
RSS
Nikita Naumov, 2015-03-03 18:57:59

How to add html tags to description in wordpress rss feed?

How to add html tags (only p and a href) for content in wordpress rss feed?
the construction <?php the_excerpt_rss(); ?> - displays the entire text without additional. fields and without tags
what to add / replace so that only the text of the post is displayed with the formatting of the p and a href tags?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sydorenko, 2015-03-03
@San40

Here is the solution to your problem wordpress.stackexchange.com/questions/141125/allow...
True, as a result of this approach, html tags will also be displayed for calling a simple the_excerpt, but I think this can be bypassed if desired.
Trying to replace

remove_filter('get_the_excerpt', 'wp_trim_excerpt');
...
...
add_filter('get_the_excerpt', 'wpse_custom_wp_trim_excerpt');

respectively on
remove_filter('the_excerpt_rss', 'wp_trim_excerpt');
add_filter('the_excerpt_rss', 'wpse_custom_wp_trim_excerpt');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question