Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • J3200
    Participant

    Hi!

    Thank you for a great plugin. Im not an WordPress expert, but Im currently building our updated site myself. In our current site we used the Super rss-reader as a news ticker, but for this update Im creating a page that acts like a real news page. Ive managed to modify everything to visually match the site’s other design, but one thing I would like to do that I have not succeeded.

    I would like to have the “read more” text placed below the description with one empty line in between. This would way better match the site elsewhere. Is this possible?

    Also a second question (not so important atm) would be, is it possible to use a button instead of just typed text?

    Thank you!

    Hi @j3200,

    Thanks for using Super RSS Reader and glad that you liked it.

    Sorry for the late reply.

    Yes it is possible to customize the output using the PHP filters provided by the plugin.

    Below is the hook to achieve that.

    Actions and Filters

    This would be the implementation. I haven’t tested this, but it should work. Please change the class name of the read more button as required.

        add_filter( 'srr_mod_item_html', 'srr_read_more_btn', 10, 3 );
    
        function srr_read_more_btn( $html, $feed_url, $feed_item ){
            // Get the permalink for the current feed item
            $permalink = esc_url( $feed_item->get_permalink() );
    
            // Create the "Read More" button HTML
            $read_more_button = '<a href="' . $permalink . '" class="read-more-button" target="_blank">Read More</a>';
    
            // Append the button to the description
            $html['description'] .= '<br>' . $read_more_button;
    
            return $html;
        }

    Thanks,
    Aakash

Viewing 2 posts - 1 through 2 (of 2 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