Support » Plugin: RSS Aggregator by Feedzy - Powerful WP Autoblogging and News Aggregator » Shortcode: Don’t display “The post […] appeared first…” in exerpt?

  • Resolved MrMattEastwood

    (@mrmatteastwood)


    Hello, Feedzy team!

    How would I go about removing this line from the end of post summaries when I pull an RSS feed using the shortcode?

    “The post Welcome 5a ā€“ Bienvenidos 5b appeared first on Erasmus Gymnasium Frankfurt.”

    Example from erasmus-frankfurter.stadtschule.de:
    https://pasteboard.co/Jo7YKsN.png

    The shortcode used in the example:
    [feedzy-rss feeds=”https://www.erasmus-frankfurt-gymnasium.de/feed/” max=”1″ feed_title=”no” summary=”yes” summarylength=”300″ thumb=”yes” meta=”date”]

    Thanks!
    Matt.

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter MrMattEastwood

    (@mrmatteastwood)

    Also, how can I remove the word “on” in front of the date or translate it to German?

    Plugin Contributor contactashish13

    (@rozroz)

    I would suggest a new thread for each topic. In this thread I will be addressing only your first question.

    If you have knowledge of PHP (there is no other alternative), you can use the below hook to alter the output:

    
    	add_filter( 'feedzy_summary_output', function( $content, $item_url, $feed_url ) {
    		// change $content here
    		return $content;
    	}, 10, 3 );
    
    Thread Starter MrMattEastwood

    (@mrmatteastwood)

    Hey, thanks for looking into this for me. I have virtually no knowledge of PHP (I have a big book about it that I’ve been meaning to read…). A friend of mine does though and he gave me another puzzle piece.

    I tried putting the following into my child theme’s functions.php:

    add_filter( 'feedzy_summary_output', function( $content, $item_url, $feed_url ) {
    	$content = str_replace(' The post Welcome 5a ā€“ Bienvenidos 5b appeared first on Erasmus Gymnasium Frankfurt.', '', $content);
    	return $content;
    }, 10, 3 );

    I also tried:

    $content = str_replace(' The post Welcome 5a ā€“ Bienvenidos 5b appeared first on Erasmus Gymnasium Frankfurt.', '', $content);
    add_filter( 'feedzy_summary_output', function( $content, $item_url, $feed_url ) {
    	return $content;
    }, 10, 3 );

    Neither did anything on the front end. Also, I noticed that this would only work on that one particular blog post, since the text dynamically incorporates the post title, so I have no idea how to tackle that even if the above worked….

    Plugin Contributor contactashish13

    (@rozroz)

    That is why that hook provides you the item_url to make sure you are targeting the right item. We would, unfortunately, not be able to help you beyond this as that this would need further troubleshooting on your instance. We would recommend taking the help of your friend or hiring a PHP developer for this.

    Plugin Contributor contactashish13

    (@rozroz)

    We haven’t heard from you in sometime so marking this as Resolved. If you continue to face an issue, please create a new ticket. We’d be happy to help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode: Don’t display “The post […] appeared first…” in exerpt?’ is closed to new replies.