Support » Plugin: RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator » How to add “read more” link at end of summary w/ shortcode?

  • Resolved wordmax

    (@wordmax)


    How can we add the “read more” link to the article at the end of the summaries?

    For example, I’m using shortcode:
    [feedzy-rss feeds="https://www.bing.com/news/example_keyword_phrase&format=rss" max="6" feed_title="no" target="_blank" refresh="2_hours" title="100" thumb="no" size="50" meta="no" summary="yes" summarylength="500"]

    Is there a value like readmore=”yes” that I can add into the shortcode string so that “read more” will appear at the end of the 3 dots … after the summaries?

    Hope this makes sense.
    Thanks!

    • This topic was modified 3 months, 3 weeks ago by wordmax.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @wordmax you can consult our documentation here for this.

    It appears you have been extensively using our plugin (and have been pretty active on support as well) so kindly spare a moment to leave us a review. It would really help us spread the word!

    Sorry, thought I’d left a review already.

    Done.

    I tried adding both of the read more functions to wp functions, no luck getting “read more” to display at the end of the summaries.

    Seems the documentation could be a little more detailed about how to implement the suggested functions for desired results regarding “read more” link.

    Are there shortcode parameters like readmore=”somevalue” ?
    FYI – I tried searching documentation before adding this thread. No luck. That’s why I created this thread. Thanks

    • This reply was modified 3 months, 3 weeks ago by wordmax.
    Plugin Contributor contactashish13

    (@rozroz)

    @wordmax we will definitely try to make the documentation more apparent from within the plugin and try to make it more detailed.

    Can you please provide the exact, non-redacted shortcode so that we can try it at our end? The feed https://www.bing.com/news/example_keyword_phrase&format=rss is not a valid feed

    Sorry:

    Try this rss feed instead:
    https://www.bing.com/news/search?q=tesla&format=rss

    Here’s how I’d be using it to display feed w/ shortcode:
    [feedzy-rss feeds="https://www.bing.com/news/search?q=tesla&format=rss" max="6" feed_title="no" target="_blank" refresh="2_hours" title="100" thumb="no" size="50" meta="no" summary="yes" summarylength="500"]

    So can I insert a shortcode command in there for ‘readmore=”yes” or equivalent? Please show how in documentation in which file to add appropriate readmore function code and also how readmore variable can be used in shortcodes.

    Thanks

    • This reply was modified 3 months, 2 weeks ago by wordmax.
    Plugin Contributor contactashish13

    (@rozroz)

    @wordmax you would have to use the below code snippet as the the ... seem to be coming from the feed itself.

    
    function feedzy_readmore( $content, $link, $feedURL ) {
        $content = str_replace( array( '[…]', '[…]', '[&hellip;]', '...' ), '<a href="' . $link . '" target="_blank">' . __('Read more', 'yourTextDomain') . ' &rarr;</a>', $content );
        return $content;
    }
    add_filter( 'feedzy_summary_output', 'feedzy_readmore', 9, 3 );
    
    

    Thank you.

    I added the following code to the feedzy-rss-feed.php file:

    function feedzy_readmore( $content, $link, $feedURL ) {
        $content = str_replace( array( '[…]', '[…]', '[&hellip;]', '...' ), '<a href="' . $link . '" target="_blank">' . __('Read more', 'yourTextDomain') . ' &rarr;</a>', $content );
        return $content;

    And then I added the value readmore=”yes” variable in the short code string:

    [feedzy-rss feeds="https://www.bing.com/news/search?q=bitcoin&format=rss
    " max="6" feed_title="no" target="_blank" refresh="2_hours" title="100" thumb="no" size="50" meta="no" summary="yes" summarylength="200" readmore="yes"]

    If you want to change the text “Read more” edit the function code above. In my case I wanted it to show “continue reading” so I changed it.

    Hope this helps anyone trying to figure out how to get readmore link to show.

    • This reply was modified 3 months, 2 weeks ago by wordmax.
    • This reply was modified 3 months, 2 weeks ago by wordmax.

    Resolved. Thanks

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