charafweb
Forum Replies Created
-
Forum: Plugins
In reply to: [WPeMatico RSS Feed Fetcher] Wrd2cat for all campaignsIt’s the category ID that has to be pushed to arrays and not it’s name.
Issue resolved, thank you- This reply was modified 3 years, 1 month ago by charafweb.
Forum: Plugins
In reply to: [WPeMatico RSS Feed Fetcher] Fetching FaviconsThis 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
In reply to: [WPeMatico RSS Feed Fetcher] Wrd2cat for all campaignsI 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
Forum: Plugins
In reply to: [WPeMatico RSS Feed Fetcher] Fetching FaviconsAnd 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
In reply to: [Astra] how to make archive template different than blog oneAny help ? Please !
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Pagination is indexedA good read : https://yoast.com/pagination-seo-best-practices/
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Custom loopThank you very much. Yes, that code did it ??
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Custom loopHi @ahmedkaludi ,
In homepage, between the header and footer, as main content, inside content-wrapper div ??
Thank you
Forum: Plugins
In reply to: [AMP for WP - Accelerated Mobile Pages] Custom loopHi @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/), 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
In reply to: [AMP for WP - Accelerated Mobile Pages] Expose 404 errorsThanks 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.
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
Hi @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 (available for 1 day).
Forum: Plugins
In reply to: [WP 404 Auto Redirect to Similar Post] NO AMP PAGES SUPPORTI was here to post a same request ??
Apparently, the plugin can’t catch the 404 Error coming from AMP for WP ! 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
In reply to: [AMP for WP - Accelerated Mobile Pages] Custom loopI 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
@ahmedkaludi , here is a page with that issue:
https://topmatchs.com/lille-valence-direct-streaming-chaine-tv-23102019/amp/