Jan-Willem
Forum Replies Created
-
Forum: 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
Forum: Plugins
In reply to: [Default Featured Image] WPML compatibilityHi,
It took a bit longer then expected. Mostly because i thought WPML had a free version, so I needed to find somebody to help me out.
But I’m pretty sure I found the correct fix.Can you remove the DFI plugin, download this zip, and install this new beta version.
And test of course, my tests worked.Please let me know so I can release this to everybody.
Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] Multiple images for different categoriesYes sorry there is a syntax error, that’s what you get when doing it in a hurry..
The code below has the missing;
add_filter( 'dfi_thumbnail_id', 'dfi_category_random', 10, 2 ); function dfi_category_random( $dfi_id, $post_id ) { // Set a different image for posts that have the 'cats' category set. if ( has_category( 'cats', $post_id ) ) { $random_cats = array( 7, 8, ); return $random_cats[ array_rand( $random_cats ) ]; } // Set a different image for posts that have the 'dogs' category set. if ( has_category( 'dogs', $post_id ) ) { $random_dogs = array( 10, 14, ); return $random_dogs[ array_rand( $random_dogs ) ]; } return $dfi_id; // the original featured image id. }