Order get_terms by multiple meta_values

That is because get_terms() does not accept array type as a value for the ‘orderby’ parameter. The documentation says about this parameter: ‘orderby’ (string) Field(s) to order terms by. Accepts term fields (‘name’, ‘slug’, ‘term_group’, ‘term_id’, ‘id’, ‘description’), ‘count’ for term taxonomy count, ‘include’ to match the ‘order’ of the $include param, ‘meta_value’, ‘meta_value_num’, the … Read more

How to show Advanced Custom Fields data above share links, pagination, etc

Plugins typically insert their content via the_content filter. The filter runs when the_content() function is called, and passes the content through the filter before output. Remember, with a filter, you need to append to the existing content, then return the results. add_filter( ‘the_content’, ‘wpd_content_filter’, 10 ); function wpd_content_filter( $content ){ if ( is_single() && get_field( … Read more

ACF and Gravity Form file upload frontend [closed]

An even easier option is to use my Gravity Forms Media Library plugin. Here’s the meat and potatoes of the functionality: public function maybe_upload_to_media_library( $entry, $form ) { $has_change = false; foreach( $form[‘fields’] as $field ) { if( ! $this->is_applicable_field( $field ) ) { continue; } $value = $entry[ $field->id ]; if( $field->multipleFiles ) { … Read more