Jan-Willem
Forum Replies Created
-
Forum: Reviews
In reply to: [Default Featured Image] This is how a WordPress plugin should be!Thank you for the kind review
I appreciate it ??Forum: Plugins
In reply to: [Default Featured Image] Image visible in frontpageHi Gatsman,
Sorry to hear this issue.
It can be fixed but will depend a bit on the theme-setup.Do you have a “page” assigned as the home template?
If that is the setup you can exclude that page useing:<?php
/**
* Plugin Name: Default Featured Image - exclude home
* Plugin URI: https://www.ads-software.com/support/topic/image-visible-in-frontpage/
* Version: 1.0
*/
add_filter( 'dfi_thumbnail_id', 'dfi_skip_page', 10, 2 );
function dfi_skip_page( $dfi_id, $post_id ) {
if ( (int) $post_id == (int) get_option( 'page_on_front' ) ) {
return 0; // exclude.
}
return $dfi_id; // the original featured image id.
}You can put the code in your theme’s function.php
Or even better create your own mini plugin. wp-content/plugins/dfi-categories.php (and activate it)Can you try this and let me know how it goes?
Best,
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] How Remove Trailing Slash from HTML ImageHello Mhasanb,
I understand your problem, but the Default Featured Image does nothing with the
<img>
tag itself.
It only changes the src and adds an extra class. But the actual HTML is rendered by WordPress core.From my tests I see the same slash for normal images.
Sorry, but I cannot help you
Jan-Willem
Forum: Plugins
In reply to: [WP Google Review Slider] 8.2 hidden noticeI tested it and it seems solved
Thanks
Forum: Plugins
In reply to: [Pronamic Pay] Mollie payments expire too soonHi Reüel,
Thanks for the quick reply.
Priorities changed (this is down) but I will take a look at your suggestions when this comes back up.
And followup will probably be with MollieThanks again
Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] WPML compatibilityHi,
I’m closing this due to inactivity.
If you do need help let me know.Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] Featured imagine only for specific categoryHi faina,
Sorry I did not see this message before.
You can set a different image per category with the following code:add_filter( 'dfi_thumbnail_id', 'dfi_category', 10, 2 );
function dfi_category( $dfi_id, $post_id ) {
// Set a different image for posts that have the 'cats' category set.
// This will trigger first, if multiple categories have been set.
if ( has_category( 'cats', $post_id ) ) {
return 7; // cats img id.
}
// Set a different image for posts that have the 'cats' category set.
if ( has_category( 'dogs', $post_id ) ) {
return 8; // dogs img id.
}
return $dfi_id; // the original featured image id.
}Let me know if you need help in adding this.
Jan-Willem
Hi Nadya,
The DFi plugin does nothing with Javascript on the frontend. It only changes the HTML of the featured image,
It does include Javascript in the wp-admin. Do you do minification in the admin?
Best,
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Critical error when using custom post type imageDoes the regular Default Featured Image work?
The one that you can set in the settings.Forum: Plugins
In reply to: [Default Featured Image] Critical error when using custom post type imageAre you sure 8924 is an image ID?
if not images are showing it is different, so it does something.Does the regular DFI show when you remove this snippet?
Forum: Plugins
In reply to: [Default Featured Image] Critical error when using custom post type imageHi,
The code has the wrong quotes types. I don’t know if this is because an copy-paste error.
But below is the correctly formatted code:add_filter( 'dfi_thumbnail_id', 'dfi_posttype_listings', 10, 2 );
function dfi_posttype_listings( $dfi_id, $post_id ) {
$post = get_post( $post_id );
if ( 'listings' === $post->post_type ) {
return 8924;
}
return $dfi_id;
}And side from wrong quotes this seems like the correct code.
Let me know how it goes.
Jan-WillemForum: Plugins
In reply to: [WooCommerce] /?wc-ajax=update_order_review 403We are using CloudFlare. And under some certain conditions it also blocked these requests under it’s “Cloudflare OWASP Core Ruleset”.
Maybe this information will save somebody else an hour in the future.
Forum: Plugins
In reply to: [Default Featured Image] Removing default featured image not workingHi,
What access do you have?
Can you install plugins?
Without access to code this will be quite impossible to test.Forum: Reviews
In reply to: [Default Featured Image] Ottimo! Aggiornamento!CIAO,
Mantengo questo plugin da più di 10 anni e continuerò a farlo nel prossimo futuro. è uno sforzo molto basso da mantenere.
*translated with google translate.
Forum: Plugins
In reply to: [Default Featured Image] Restrict Default Image to One Post TypeHi Dave.
Always good to hear someone tweaking it by themselves.
This is exactly how I would code this.
Best, Jan-Willem