Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Vendors › When posting Article, make picture required
- This topic has 2 replies, 2 voices, and was last updated 4 years, 5 months ago by andero.avastu.
Viewing 2 reply threads
- AuthorPosts
- April 15, 2020 at 2:16 am #119192andero.avastuParticipant
Hello,
What should I change in the Plugin code to make the Picture required or make it have some default picture, because Elementor needs picture to show Category.
I hope anyone can give me code sample.Thanks in advance!
Attachments:
You must be logged in to view attached files. - April 15, 2020 at 12:18 pm #119284Sarmistha ChakrabortyMember
Hello,
From your topic title “When posting Article, make picture required” ,
What we understand that, you want the “Image” field required for “artice”/”post”,
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/add_filter('wcfm_article_manage_fields_gallery',function($fields,$artcle_id){ $fields['featured_img']['custom_attributes'] = array( 'required' => true ); return $fields; },10,2);
Thanks.
- April 15, 2020 at 2:51 pm #119328andero.avastuParticipant
Thank you very much!
- AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.