• Hello.
    I need to provide an RSS feed that can be used by external websites, so when they use the #######.com/events/feed/ rss link, to display events from my client’s site, apart from showing the default details (date/s time/s descriptions, URLs etc), the feed will also display a small or medium size thumbnail image above or below each respective event details.
    Your help will be very much appreciated.
    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    Hi,

    did you already tried to add #_EVENTIMAGEURL under events > settings > formatting > rss > RSS description format ?

    https://wp-events-plugin.com/documentation/placeholders/

    Thread Starter mattfar

    (@mattfar)

    Hello Angelo,

    Thank you for your reply. Ple note that the image must be a thumbnail (or custom size)
    I tried the following with the following results:

    Try 1 RSS description format
    #_EVENTIMAGEURL <br/>#_EVENTDATES – #_EVENTTIMES <br/>#_LOCATIONNAME <br/>#_LOCATIONTOWN
    Not good as it only shows the code image URL in rss feed (eg htpps://#######.com/wp-content/uploads/2021/08/#######.jpg
    event title, dates, time, description good

    Try 2
    RSS description format
    <br/>#_EVENTDATES – #_EVENTTIMES <br/>#_LOCATIONNAME <br/>#_LOCATIONTOWN
    No errors but does not show image
    event title, dates, time, description good

    Try 3
    RSS description format
    #_EVENTIMAGE <br/>#_EVENTDATES – #_EVENTTIMES <br/>#_LOCATIONNAME <br/>#_LOCATIONTOWN
    Does not show image
    Shows: event title, dates, time,
    Does not show: event description

    Try 4
    <br/>#_EVENTDATES – #_EVENTTIMES <br/>#_LOCATIONNAME <br/>#_LOCATIONTOWN
    No errors but does not show image
    Shows: event title, dates, time, description

    I’ve also tried the code on this page https://wpism.com/image-wordpress-rss-feed/ (code below) in the function.php of my child theme but it does not work on the events rss feed. Perhaps because I am not using the eventimage or eventimageurl but would not know how to recode the below code with eventimage or eventimageurl properly

    <?php
    //This will prepend your WordPress RSS feed content with the featured image
    add_filter(‘the_content’, ‘smartwp_featured_image_in_rss_feed’);
    function smartwp_featured_image_in_rss_feed( $content ) {
    global $post;
    if( is_feed() ) {
    if ( has_post_thumbnail( $post->ID ) ){
    $prepend = ‘<div>’ . get_the_post_thumbnail( $post->ID, ‘medium’, array( ‘style’ => ‘margin-bottom: 10px;’ ) ) . ‘</div>’;
    $content = $prepend . $content;
    }
    }
    return $content;
    }`

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Event Image In Rss Feed’ is closed to new replies.