Title: charafweb's Replies | WordPress.org

---

# charafweb

  [  ](https://wordpress.org/support/users/charafweb/)

 *   [Profile](https://wordpress.org/support/users/charafweb/)
 *   [Topics Started](https://wordpress.org/support/users/charafweb/topics/)
 *   [Replies Created](https://wordpress.org/support/users/charafweb/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/charafweb/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/charafweb/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/charafweb/engagements/)
 *   [Favorites](https://wordpress.org/support/users/charafweb/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/charafweb/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/charafweb/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/charafweb/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/charafweb/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPeMatico RSS Feed Fetcher] Wrd2cat for all campaigns](https://wordpress.org/support/topic/wrd2cat-for-all-campaigns/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrd2cat-for-all-campaigns/#post-15330875)
 * It’s the category ID that has to be pushed to arrays and not it’s name.
    Issue
   resolved, thank you
    -  This reply was modified 4 years, 8 months ago by [charafweb](https://wordpress.org/support/users/charafweb/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPeMatico RSS Feed Fetcher] Fetching Favicons](https://wordpress.org/support/topic/fetching-favicons/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fetching-favicons/#post-15325869)
 * 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 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPeMatico RSS Feed Fetcher] Wrd2cat for all campaigns](https://wordpress.org/support/topic/wrd2cat-for-all-campaigns/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/wrd2cat-for-all-campaigns/#post-15325850)
 * I think I can use the hook wpematico_pre_insert_post_callback to access to categories
   before inserting post. I think I can do a preg_match on title (for instance) 
   to search for keywords and if found push a category to $args[‘post_category’].
 * I used the plugin ‘WPeMatico Custom Hooks’ to make a test like bellow. I’m tryin
   here to add a preexisting category called ‘Fashion’ to every new post, but it’s
   not working:
 *     ```
       function wpematico_pre_insert_post_callback($args, $campaign)
       {
       	$args['post_category'] = 'Fashion';
       	return $args;
       }
       ```
   
 * I tried also this hook, in this way, for testing purpose:
 *     ```
       function wpematico_categories_after_filters_callback($categories, $item, $cfg){
       	$categories = 'Fashing'; // <== trying to add this category
       	return $categories;
       }
       ```
   
 * But It’s not working either.
 * I have a feeling that I’m missing something very simple here, but I have no clue.
 * Any help would be much appreciated.
 * Thanks
    -  This reply was modified 4 years, 8 months ago by [charafweb](https://wordpress.org/support/users/charafweb/).
    -  This reply was modified 4 years, 8 months ago by [charafweb](https://wordpress.org/support/users/charafweb/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPeMatico RSS Feed Fetcher] Fetching Favicons](https://wordpress.org/support/topic/fetching-favicons/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/fetching-favicons/#post-15280216)
 * 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.
 * Thanks
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Astra] how to make archive template different than blog one](https://wordpress.org/support/topic/how-to-make-archive-template-different-than-blog-one/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/how-to-make-archive-template-different-than-blog-one/#post-13140529)
 * Any help ? Please !
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Pagination is indexed](https://wordpress.org/support/topic/pagination-is-indexed/)
 *  [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/pagination-is-indexed/#post-13106763)
 * A good read : [https://yoast.com/pagination-seo-best-practices/](https://yoast.com/pagination-seo-best-practices/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Custom loop](https://wordpress.org/support/topic/custom-loop-9/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-loop-9/#post-13106736)
 * Thank you very much. Yes, that code did it 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Custom loop](https://wordpress.org/support/topic/custom-loop-9/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-loop-9/#post-13099727)
 * Hi [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/) ,
 * In homepage, between the header and footer, as main content, inside content-wrapper
   div 🙂
 * Thank you
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Custom loop](https://wordpress.org/support/topic/custom-loop-9/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-loop-9/#post-13095057)
 * Hi [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * I know you are so busy, so thank you for giving me some of your time to help 
   on this.
 * I read the tuto ([https://ampforwp.com/tutorials/article/loop/](https://ampforwp.com/tutorials/article/loop/)),
   but I can’t figure what & how to do it ! How to pass custom $args to the loop
   for instance ? Or how to set new values ($query->set) ?
 * Would you please elaborate on how and what to add to the functions.php ?
 * Is it possible to make a full example, so it can be as reference to other people
   looking to achieve the same thing ? Let’s say we want to create a widget that
   will display only upcoming events based on a date stored into a meta field. How
   to achieve this? I did google about this but I can’t found anything.
 * Thank you again
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Expose 404 errors](https://wordpress.org/support/topic/expose-404-errors/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/expose-404-errors/#post-13094973)
 * Thanks again for your availability. No, that plugin is not working with AMPforWP,
   unfortunately. But, never mind, I dropped it, and I’m using my own code to redirect
   404 pages. So, please consider that this is resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] CSS syntax error in tag ‘style amp-custom’ – invalid declaration](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/#post-13094656)
 * Thank you for your reply. Yes, it’s working great because I switched back to “
   Left” for “Menu Overlay Position”. Anyway, thank you very much, I’m happy with
   you plugin, and I wish all the best
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] CSS syntax error in tag ‘style amp-custom’ – invalid declaration](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/#post-13091637)
 * Hi [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * Yes, “Minify” was activated. But, even if disabled the magnification the issue
   persist.
 * You can find my options I exported from the plugin here : [https://pastebin.com/CUhTWZBu](https://pastebin.com/CUhTWZBu)(
   available for 1 day).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP 404 Auto Redirect to Similar Post] NO AMP PAGES SUPPORT](https://wordpress.org/support/topic/no-amp-pages-support/)
 *  [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/no-amp-pages-support/#post-13089487)
 * I was here to post a same request 🙂
 * Apparently, the plugin can’t catch the 404 Error coming from [AMP for WP](https://wordpress.org/plugins/accelerated-mobile-pages/)!
   But, it did for WP AMP (Codecanyon) .
 * My request is to add support for the free amp plugin : AMP for WP .
 * Thank you very much
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] Custom loop](https://wordpress.org/support/topic/custom-loop-9/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/custom-loop-9/#post-13089076)
 * I want the loop output to be displayed into homepage.
 * I did a mistake here :
 * `if (!is_admin() && is_singular() && $query->is_main_query())`
 * I think it should be :
 * `if (!is_admin() && is_home() && $query->is_main_query())`
 * Thanks you very much
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP for WP - Accelerated Mobile Pages] CSS syntax error in tag ‘style amp-custom’ – invalid declaration](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/)
 *  Thread Starter [charafweb](https://wordpress.org/support/users/charafweb/)
 * (@charafweb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/css-syntax-error-in-tag-style-amp-custom-invalid-declaration/#post-13078988)
 * [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/) , here is a 
   page with that issue:
 * [https://topmatchs.com/lille-valence-direct-streaming-chaine-tv-23102019/amp/](https://topmatchs.com/lille-valence-direct-streaming-chaine-tv-23102019/amp/)
    -  This reply was modified 6 years, 3 months ago by [charafweb](https://wordpress.org/support/users/charafweb/).
    -  This reply was modified 6 years, 3 months ago by [charafweb](https://wordpress.org/support/users/charafweb/).

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/charafweb/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/charafweb/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/charafweb/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/charafweb/replies/page/2/?output_format=md)