Wordpress: How do I add a thumbnail query into RSS Enclosure? - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Saturday, July 1, 2023

Wordpress: How do I add a thumbnail query into RSS Enclosure?

I'm trying to add a thumbnail to the RSS enclosure URL, so, like this:

I've found the query to use for querying the thumbnail, using "the_post_thumbnail".

The rest of the code looks like this

<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<content:encoded><![CDATA[<?php the_excerpt_rss(); ?>]]></content:encoded>

<?php rss_enclosure(); ?>

When I try deleting and simply typing out ]]>" /> the RSS feed breaks.

Any ideas how I can do this and, how do I specify the length using the ]]> By itself it works, but it pulls in a lot more information and the wrong dimensions as well.

Thanks!



source https://stackoverflow.com/questions/76591445/wordpress-how-do-i-add-a-thumbnail-query-into-rss-enclosure

No comments:

Post a Comment