• Hi,

    In the feed list, the title for each feed article is showing as the headline.
    Yet each feed article excerpt also begins with article title.

    Is there any way to not include the title of the feed in each feed item excerpt?
    To avoid redundancy and for a more user-friendly reading/scanning of news.

    Thanks!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Travis

    (@tjtaylor)

    Hello,

    Can you post the feed URL and your shortcode?

    Thread Starter wordmax

    (@wordmax)

    Our site is using another plugin to create auto-posts via RSS Google Search Trends. For the featured news articles in the content of the post, we’re using your plugin with the following custom function and added via [custom_rss] shortcode into the posts using the Ad Inserter plugin. Seems to work well, but just want to figure out how to not have the RSS titles show up redundantly again in the excerpt below the title/headlines.

    // create [custom_rss] shortcode
    add_shortcode( 'custom_rss', 'execute_custom_rss_shortcode' );
    function execute_custom_rss_shortcode() {
      return do_shortcode('[wp_rss_retriever url="https://news.google.com/rss/search?q=' . get_the_title() . '&hl=en-US&gl=US&ceid=US%3Aen" items="7" excerpt="50" read_more="true" credits="false" new_window="true" cache="3 hours"]');
    }
    • This reply was modified 5 years, 2 months ago by wordmax.
    • This reply was modified 5 years, 2 months ago by wordmax.
    • This reply was modified 5 years, 2 months ago by wordmax.
    Plugin Author Travis

    (@tjtaylor)

    This is happening because the source includes the title in the description. For example: https://news.google.com/rss/search?q=sports&hl=en-US&gl=US&ceid=US%3Aen

    Your best bet here would be to remove the title by adding title=”false”.

    Alternatively, if you’re good with PHP you could alter the output with PHP’s built-in classes DomDocument and DomXPath to grab the title (remove the dash) and then remove the title from the excerpt before returning the output.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to not include RSS feed title in the excerpt’ is closed to new replies.