When posting Article, make picture required

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WC Vendors When posting Article, make picture required

Viewing 2 reply threads
  • Author
    Posts
    • #119192
      andero.avastu
      Participant

      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.
    • #119284

      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.

    • #119328
      andero.avastu
      Participant

      Thank you very much!

Viewing 2 reply threads
  • You must be logged in to reply to this topic.