• Resolved Roman Matovsky

    (@fireroman)


    Hello. Help me please, how can I add image in portfolio RSS. I know how to add in main feed, but it doesn’t affect on portfolio.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support MadHatter (a11n)

    (@madhattersez)

    Hello there, Roman.

    I don’t quite understand your request. Are you having an issue with Jetpack’s Portfolio at the moment, or an issue with your RSS feed?

    What are you trying to accomplish exactly, and what isn’t working the way you expect?

    If you’d be able to provide us with more details, actual error messages, or screen shots of the issues you’re seeing, that would definitely help. Thanks!

    Thread Starter Roman Matovsky

    (@fireroman)

    Image in main RSS feed (https://mysite/feed/) —> ok.
    Image in RSS portfolio (https://mysite/portfolio/feed) -> no.
    I need image in RSS portfolio (https://mysite/portfolio/feed) -> ok.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Thanks for the extra details. Are you referring to Featured images in particular? If so, did you use a specific code snippet to display your posts’ featured images in your RSS feed? Could you post that snippet here?

    It may also help if you could post your site URL here so we can see how things look like on your site at the moment.

    Thank you!

    Thread Starter Roman Matovsky

    (@fireroman)

    Thank you Jeremy.
    By default WordPress users don’t have images in RSS feed. We can use plugins or code in functions.php:

    function wcs_post_thumbnails_in_feeds( $content ) {
        global $post;
        if( has_post_thumbnail( $post->ID ) ) {
            $content = '<p>' . get_the_post_thumbnail( $post->ID ) . '</p>' . $content;
        }
        return $content;
    }
    add_filter( 'the_excerpt_rss', 'wcs_post_thumbnails_in_feeds' );
    add_filter( 'the_content_feed', 'wcs_post_thumbnails_in_feeds' );

    I’m looking for similar solution for portfolio, because code above works only for post. Is it possible?

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    I’m looking for similar solution for portfolio, because code above works only for post. Is it possible?

    That’s a good question. That question is not directly to Jetpack so I may not be able to help, but I would recommend that you look into whether has_post_thumbnail and get_the_post_thumbnail are the best fit for your needs here outside of the post context. You can read more about this here:
    https://wordpress.stackexchange.com/q/115607/27574

    If that does not help, it may be best to ask for help in the general forums, as this is more of a general WordPress question (how to display a featured image in a Custom Post Type’s RSS feed).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image in portfolio RSS’ is closed to new replies.