Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: RSS feed not working
    Jeff Kimmel
    Participant

    Aakssh,

    Got it working, thanks for all you help!

    Jeff

    in reply to: RSS feed not working
    Jeff Kimmel
    Participant

    Aakash,

    Thanks for the feedback. I created a little program that calls the feed & saves the xml file. In testing, it looks like the RSS is using the cached version of the file (I removed the file on the server & the feed was still working). Is there any way to set the reader to not cache?

    Terence,

    We’re a MS shop and the program I wrote is in c#, would you like the code snippet that I’m using? It might help your issue if you can get the feed in an XML file.

    Thanks,

    Jeff

    in reply to: RSS feed not working
    Jeff Kimmel
    Participant

    Aakash,

    I added the code snippet & copy and pasted what you showed & it still isn’t working. Like I said before, the RSS feed that is received has blank lines at the beginning & it didn’t validate. I’m not sure where to go from here.

    Jeff

    in reply to: RSS feed not working
    Jeff Kimmel
    Participant

    Aakash,

    I searched the code on our site & tried to add what you mentioned into Utilities.php in ‘plugins\super-rss-reader\includes\Utilities.php’. It’s a static class so I changed a couple things but it didn’t help the issue. Where does this need to go? Below are the contents of Utilities.php for review.

    Thanks,

    Jeff

    public static function init(){

    add_filter( ‘the_excerpt_rss’, array( __CLASS__, ‘insert_featured_image_rss_feed’ ) );
    add_filter( ‘the_content_feed’, array( __CLASS__, ‘insert_featured_image_rss_feed’ ) );
    add_filter( ‘wp_feed_options’, ‘srr_set_user_agent’, 10, 2 );
    }

    public static function insert_featured_image_rss_feed( $content ){

    global $post;

    preg_match_all( ‘~<img.*?src=[“\’]+(.*?)[“\’]+~’, $content, $image_urls );

    if( empty( $image_urls[1] ) && has_post_thumbnail( $post->ID ) ) {
    $content = ‘<p>’ . get_the_post_thumbnail( $post->ID ) . ‘</p>’ . $content;
    }

    return $content;

    }

    public static function srr_set_user_agent( &$feed, $url ) {

    $feed->set_useragent(‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36’);

    }

    in reply to: RSS feed not working
    Jeff Kimmel
    Participant

    Aakash,

    Thanks for the reply but where do I copy that to? I’m using the wordpress plug in & I have a bunch of files i could put it in but I’m not sure where it should go.

    Thanks,

    Jeff

Viewing 5 posts - 1 through 5 (of 5 total)

Subscribe to our Newsletter

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter

By using this website, you agree to our Terms