Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Baystreeter
    Participant

    Hello,

    I’m using shortcodes to display RSS feed in a page and several blog posts

    I want to use hooks and filters to modify the output, but only if it’s in a post. The output in the page should not be modified.

    I tried to use the following but it did not work

    <?php
    if ( is_single() && ! is_page() ) {
    add_filter( ‘srr_mod_item_html’, ‘my_srr_modifier’, 10, 3 );

    function my_srr_modifier( $html, $feed_url, $feed_item ){
    $html[ ‘title’ ] = $html[ ‘title’ ] . ‘ extra text’;
    return $html;
    }
    }
    ?>

    Any help is appreciated.
    Thanks

    Hi Bay,

    Please follow along the code hint below.

    function my_srr_modifier( $html, $feed_url, $feed_item ){
        if ( is_single() && 'post' == get_post_type() ) {
        	 $html[ 'title' ] = $html[ 'title' ] . 'extra text';
        }
        return $html;
    }
    add_filter( 'srr_mod_item_html', 'my_srr_modifier', 10, 3 );

    Thanks,
    Aakash

    Baystreeter
    Participant

    Thanks, that works !!!

    Another question.

    If I use 2 settings:

    #1- count=”10″ display_type=”vertical_ticker” visible_items=”5″
    #2- count=”50″ display_type=”vertical_ticker” visible_items=”5″

    Does #2 increase the page load time substantially?

    Baystreeter
    Participant

    Also I noticed that SRR has made many calls to the database and also increased its size. The number of calls and size exceeded my quotas.

    Any tips for reducing the excessive calls and space? like not using images, fewer feed items etc.?

    Hi,

    Super RSS Reader displays contents by parsing the RSS feed directly. The RSS feed is however cached by WordPress in DB for 12 hours. Everytime the reader is displayed, it tries to get the feed contents from the cache or it fetches the rss feed directly.

    It does not access database except the widget settings.

    Rgarding your 2nd question, it depends on the RSS feed contents. If your RSS feed has lots of text and if you are displaying full contents of the feed then the page may get heavier. Otherwise it shouldn’t cause an impact.

    Thanks,
    Aakash

    Baystreeter
    Participant

    ok, makes sense.

    Is there a way to only display feed items that have a summary?

    Thanks

    Hi,

    Super RSS Reader – PRO has been updated to v4.9.

    In this version, you can create a filter with value set as ‘*’ to feed description. This way you can filter out feed items without a description.

    Filter by Keyword

    Please do upgrade to check it out.

    Thanks,
    Aakash

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Subscribe for updates

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