Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Kevin Schmalz
    Participant

    Is there a way to make the rss description so that it is turned into the same url as the rss title?

    Hi Kevin,

    Do you mean, you want to make the feed description as a link so that it is clickable?

    Thanks,
    Aakash

    Kevin Schmalz
    Participant

    Yes that is correct.

    Kevin Schmalz
    Participant

    Can you please give me an update regarding the RSS description being clickable as well just like the title?

    Hi Kevin,

    To make any advanced changes like this, the plugin provides helper functions to play manipulate the output as needed.

    You might need to use PHP code to do that like in the example below.

    Actions and Filters

    If you are comfortable with that, you can use that hook and wrap the description with an “a” tag. Otherwise let me know, I will write that for you. I can share you the code by tomorrow after testing.

    Thanks,
    Aakash

    Kevin Schmalz
    Participant

    If you could please write that for me, that would be great. Thank you for the reply.

    Hi Kevin,

    I’ll add this option in the next version.

    For now add below PHP code to your website’s function.php file or using a custom plugin – https://www.aakashweb.com/articles/create-site-specific-wordpress-plugin-custom-code/

    function my_srr_modifier( $html, $feed_url, $feed_item ){
        $url = $feed_item->get_link();
        $html[ 'description' ] = '<a href="' . esc_attr( $url ) . '" target="_blank">' . $html[ 'description' ] . '</a>';
        return $html;
    }
    
    add_filter( 'srr_mod_item_html', 'my_srr_modifier', 10, 3 );

    Thanks,
    Aakash

    Kevin Schmalz
    Participant

    Thank you for your time and getting this resolved.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Make the RSS description into the same URL as the title’ is closed to new replies.

Subscribe for updates

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