Jan-Willem
Forum Replies Created
-
Forum: Plugins
In reply to: [Default Featured Image] 1.7.3 says it requires WP 6.2No problem,
Let me know if there is anything else 🙂Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] 1.7.3 says it requires WP 6.2Hi
it’s required as it uses the a new php class introduced in 6.2: WP_HTML_Tag_Processor
The 1.7.3 update includes a bugfix which is incredibly rare to trigger.
So staying on 1.7.2 should be fine.
You can download 1.7.2 here.Let me know if you have anymore questions.
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Not working and image deleted after last updateI cannot test it with tagDiv Newspaper theme as it’s a paid theme.
But as it is a paid theme I suggest you ask the theme developers to check this out.If needed the theme developers can contact me at any time on this forum.
Good luck and let me know.
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Suggested feature: DFI by category!Hi,
When I created this plugin 10 years back I intentionally didn’t added a UI for these type of things.
I was afraid it would get bloated and confusing. Should CPT take prio over tags? And what about categories and sub-categories?
The answer to these type of questions are all very opinion based.I have several code snippets that can do all these in the FAQ.
Maybe I’ll expend in the future. But I don’t have anything planned short term.
Feel free to ask me when you need help!
Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] Not working and image deleted after last updateI tried the following.
- Installed a new WP 6.0 site with twentytwentytwo and the DFI plugin
- I set a Default featured image in the settings.
- Created 4 posts, 2 with a featured image.
- Tested, all images are shown as expected
- Updated to WP 6.2
- Tested, all images are shown as expected
- Switched theme to twentytwentythree,
- Tested, all images are shown as expected
If you can answer the previous questions I can take another look.
Jan-Willem
Forum: Plugins
In reply to: [Default Featured Image] Featured image block styling is not appliedHi,
I tried to replicate this but I don’t see it.
The border radius is applied to all images DFI or not.In your screenshot the border radius doesn’t seem to apply to any image, DFI or not.
Does the border radius get applied when the DFI plugin is deactivated?
What theme are you using?Let me know.
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Not working and image deleted after last updateHi Fidoboy,
Tomorrow I already planned some time for maintenance. So I can investigate this.
Can you give me some more detail.
- What did you update? WordPress (6.2), of the Default featured image plugin? DFI had it’s last update in may-2022
- How was it deleted? Was it just unset form the media settings?
Or was the image deleted from the media library? - Do you use any page builders? Or any plugins that might interfere with images in general?
Let me know so I have a better idea what to look for.
Best,
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Featured image block styling is not appliedThanks for telling me, I’ll take a look at it later this week.
Hi,
I can’t check it fully right now but it probably should work with this:
add_filter( 'dfi_thumbnail_id', 'dfi_acf_rough_example', 10, 2 ); function dfi_acf_rough_example( $dfi_id, $post_id ) { $post = get_post( $post_id ); $acf_field = get_field('mbrs_palinam', $post->ID); if ( $acf_field === 'Men' ) { return 31; // the image id for the acf-gender. } return $dfi_id; // the original featured image id. }
Let me know how it goes.
- This reply was modified 1 year, 5 months ago by Jan-Willem.
- This reply was modified 1 year, 5 months ago by Jan-Willem.
Hi Jagan,
That’s absolutely possible but you will have to custom code it. Depending your ACF fields. I understand you already found the code snippets for CPT.
add_filter( 'dfi_thumbnail_id', 'dfi_acf_rough_example', 10, 2 ); function dfi_acf_rough_example( $dfi_id, $post_id ) { $post = get_post( $post_id ); $acf_field = get_field('ACF_FIELD', $post->ID); if ( $acf_field === 'value to check' ) { return 31; // the image id for the book post type. } return $dfi_id; // the original featured image id. }
What value you get back does depend on the acf field type.
Might be a string, might be an array.Does this help you?
Let me know
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] Default for CPTHi pipoulito,
Yes that’s possible
<?php /** * Plugin Name: Default Featured Image, apply to posts only. * Plugin URI: https://wordpress.org/support/topic/default-for-cpt/ * Version: 1.0 */ function dfi_no_page_post( $dfi_id, $post_id ) { $post = get_post( $post_id ); if ( $post->post_type === 'page' ) { return 1234; // For Pages set the image with media ID 1234 as the default. } return $dfi_id; // the original featured image id } add_filter( 'dfi_thumbnail_id', 'dfi_no_page_post', 10, 2 );
Adjust the image id (1234 in the example) and replace ‘page’ with your custom post type.
Let me know how it goes.
Jan-Willem
Forum: Plugins
In reply to: [Disable Full Site Editing] Link to Site Editor appears in CustomisationHi,
As promised.
I’ve changed the way a FSE theme is detected. IT should be a lot more robust now.Let me know how it goes!
Forum: Plugins
In reply to: [Default Featured Image] Defaults for CPT and termsHi,
When I created this plugin 10 years back I intentionally didn’t added a UI for these type of things.
I was afraid it would get bloated and confusing. Should CPT take prio over tags? And what about categories and sub-categories?
The answer to these type of questions are all very opinion based.So I’d prefer users just answered these themselves within the code snippets.
Nowadays I would see the extra value of adding a UI for the CPT.
But I don’t have anything planned, so don’t expect anything soon.Jan-Willem
Forum: Plugins
In reply to: [Disable Full Site Editing] Link to Site Editor appears in CustomisationHello,
Sorry for the late reply. My schedule is just crazy. And this was at the bottom of my inbox.
I agree with your points.
And I plan to implement them the last week of the year, between the holidays.I’ll let you know.
Best,
Jan-WillemForum: Plugins
In reply to: [Default Featured Image] resizing the imageHello,
This plugin does nothing with image sizes. It just set’s an image ID.
How the image is displayed is the task of the theme.The sort answer is: No.
Let me know if you need anything else.
Jan-Willem