Forums » Plugin: WPeMatico RSS Feed Fetcher » Fetching Favicons

  • Resolved charafweb


    First of all thank you for awesome plugin.
    I have a question : is there a way to fetch favicon urls ? a function to include into functions.php ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter charafweb


    And yes it’s possible. I have found a rough method : editing the file \wp-content\plugins\wpematico\app\campaign_fetch_functions.php

    $vars = array(
        '{feedfavicon}'		 => $feed->get_favicon(), // <== ADD THIS ===
        '{title}'			 => $current_item['title'],
        '{content}'			 => $current_item['content'],
        '{itemcontent}'		 => $item->get_description(),
        '{image}'			 => $img_str,
        '{author}'			 => $autor,
        '{permalink}'		 => $current_item['permalink'],
        '{feedurl}'			 => $feed->feed_url,
        '{feedtitle}'		 => $feed->get_title(),
        '{feeddescription}'	 => $feed->get_description(),
        '{feedlogo}'		 => $feed->get_image_url(),

    This will create a new tag {feedfavicon} that we can use in “post template”.

    Yes, it’s not recommendable to touch original files, but I’m not a php ninja. Maybe someone can put here a way that is more healthy than this one.


    Plugin Author etruel


    Hi @charafweb
    Thanks for the tip.
    As you said in your first message, this can be added with a filter in your function.php. Anyway will not be necessary because we’ll add it by default in the next version of the plugin.


    Thread Starter charafweb


    This would be much appreciated.
    A suggestion if possible to add a fallback image (a custom favicon) if the favicon cannot be fetched, thing that I came across when trying the solution I posted.
    Thank you very much for your hard work 🙂

    Plugin Author etruel


    Hi @charafweb,
    You can find the new tag for favicon urls in the post template feature of the las version released today 2.6.14

    We have also added a wp filter to allow you customize its value with external filters.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fetching Favicons’ is closed to new replies.