Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @iriteser!

    We’re glad to hear you enjoy Feedzy, thanks for taking the time to leave us a review!

    Have a great day!

    Thread Starter iriteser

    (@iriteser)

    just one thing – tried to make my own plugin with this code and pluginception. Got an fatal error and had to remove it on my FTP server

    Display the name of the source when using multiple sources
    add_filter( 'feedzy_author_name', 'feedzy_author_name', 10, 3 );
    function feedzy_author_name( $authorName, $feedURL, $item ) {
    	$source		= '';
    	if ( is_array( $feedURL ) ) {
    		// if feedURL is multiple urls.
    		foreach ( $feedURL as $feed ) {
    			if ( strpos( strtolower( $feed ), 'https://www.lavanguardia.com/mvc/feed/rss/home' ) !== false ) {
    				$source	= 'La Vanguardia';
    			}
    			if ( strpos( strtolower( $feed ), 'https://ep00.epimg.net/rss/tags/ultimas_noticias.xml' ) !== false ) {
    				$source	= 'El País';
    			}
    			if ( strpos( strtolower( $feed ), 'https://estaticos.elmundo.es/elmundo/rss/portada.xml' ) !== false ) {
    				$source	= 'El Mundo';
    			}
    			if ( strpos( strtolower( $feed ), 'https://www.europapress.es/rss/rss.aspx' ) !== false ) {
    				$source	= 'Europa Press';
    			}
    		}
    	} else {
    		// if feedURL is a single url.
    	}
    	return $source;<br>}

    Hi @iriteser!

    The error may occur because there is a “<br>” on the last line of the code. You can also check our documentation where you can find multiple snippets of code to customize the options that Feedzy has to offer.

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does exactly what it should do’ is closed to new replies.