Posts by DJMiMi

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Does WPML updates meta fields for all translation posts when update_post_meta(), add_post_meta(), delete_post_meta() is called or we need to create our own function to synchronize meta field changes?

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Hi Leo.

I’ve just created example on how to implement what you are looking for, not the plug and play solution since you need to adopt the names according to your widget set-up.

Here is some more info on how to create widget.

https://codex.wordpress.org/Widgets_API

Regards.

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Hi Leo

Here you go:

For display selection domething like this: $registered_taxs = get_object_taxonomies( 'profiles' ); $taxs = $instance['taxs']; echo '<select class="widefat" name="'.($this->get_field_name('taxs')).'[]" multiple>'; if( !empty( $registered_taxs ) ){ foreach( $registered_taxs as $registered_tax ){ $terms = get_terms( $registered_tax ); if( empty( $terms ) ){ foreach( $terms as $term ){ echo '<option value="'.$registered_tax.'|'.$term->term_id.'" '.( in_array( $term->term_id, $taxs ) ? 'selected="selected"' : '' ).'>'.$term->name."</option>"; } } } } echo '</select>'; For displaying the results on the frontend something like this: $taxs = $instance['taxs']; $args = array( 'post_type' => 'profile', 'posts_per_page' => '-1', ); $taxs_slugs = array(); if( !empty( $taxs ) ){ foreach( $taxs as $tax ){ $temp = explode( "|", $tax ); if( empty( $taxs_slugs[$temp[0]] ) ){ $taxs_slugs[$temp[0]] = array(); } $taxs_slugs[$temp[0]][] = $temp[1]; } } if( !empty( $taxs_slugs ) ) ){ $args['tax_query'] = array( 'relation' => 'AND' ); foreach( $taxs_slugs as $tax_name => $taxs_slugs_list ){ $args['tax_query'][] = array( 'taxonomy' => $tax_name, 'field' => 'slug', 'terms' => $taxs_slugs_list, ); } } $profiles = new WP_Query( $args ); if( $profiles->have_posts() ){ while( $profiles->have_posts() ){ $profiles->the_post() //do your display here... } } wp_reset_query();
140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says


I think it is actually after every $4000 cumulative sales http://prntscr.com/6mcd90
It is not, as I said, values in this earnings graph are rounded up. Actual value is $3750 per 1%, because 3750 * 20 = 75000.

Yup, you are right, I missed that.

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Hi Leo.

Sure you can:

For display selection domething like this: $taxs = $instance['taxs']; $all_tax_1 = get_terms( 'tax-1' ); $all_tax_2 = get_terms( 'tax-2' ); echo '<select class="widefat" name="'.($this->get_field_name('tax_1')).'[]" multiple>'; if( !empty( $all_tax_1 ) ){ foreach( $all_tax_1 as $tax ){ echo '<option value="tax-1|'.$tax->term_id.'" '.( in_array( $tax->term_id, $taxs ) ? 'selected="selected"' : '' ).'>'.$tax->name."</option>"; } foreach( $all_tax_2 as $tax ){ echo '<option value="tax-2|'.$tax->term_id.'" '.( in_array( $tax->term_id, $taxs ) ? 'selected="selected"' : '' ).'>'.$tax->name."</option>"; } } echo '</select>'; For displaying the results on the frontend something like this: $taxs = $instance['taxs']; $tax_1_slugs = array(); $tax_2_slugs = array(); if( !empty( $taxs ) ){ foreach( $taxs as $tax ){ $temp = explode( "|", $tax ); if( $temp[0] == 'tax-1' ){ $tax_1_slugs[] = $temp[1]; } else if( $temp[0] == 'tax-2' ){ $tax_2_slugs[] = $temp[1]; } } } $args = array( 'post_type' => 'profile', 'posts_per_page' => '-1', ); if( !empty( $tax_1_slugs ) || !empty( $tax_2_slugs ) ){ $args['tax_query'] = array( 'relation' => 'AND' ); if( !empty( $tax_1_slugs ) ){ $args['tax_query'][] = array( 'taxonomy' => 'tax_1', 'field' => 'slug', 'terms' => $tax_1_slugs, ) } if( !empty( $tax_2_slugs ) ){ $args['tax_query'][] = array( 'taxonomy' => 'tax_1', 'field' => 'slug', 'terms' => $tax_2_slugs, ) } } $profiles = new WP_Query( $args ); if( $profiles->have_posts() ){ while( $profiles->have_posts() ){ $profiles->the_post() //do your display here... } } wp_reset_query();
140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

I hope you get that rating removed, but there are slim chances. I received 3 star rating where customer said that the price for the plugin is high and once I contact envato they said that the rating is legit even though we as authors do not have direct influence on the prices of your items. So weird logic. o.O

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Well, from the chart it looks similar to the 02/2014 so there’s a comfort. :)

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Hi ThemeChills.

To display them in the Appearance->Widgets you can use somwthing like this

$tax_1 = $instance['tax_1'] $tax_1 = get_terms( 'tax-1' ); echo '<select class="widefat" name="'.($this->get_field_name('tax_1')).'[]" multiple>'; if( !empty( $tax_1 ) ){ foreach( $tax_1 as $tax ){ echo '<option value="'.$tax->term_id.'" '.( in_array( $tax->term_id, $tax_1 ) ? 'selected="selected"' : '' ).'>'.$tax->name."</option>"; } } echo '</select>'; Above code applies aslo for the tax_2 And to filter it on display you can use this: $profiles = new WP_Query(array( 'post_type' => 'profile', 'posts_per_page' => '-1', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'tax_1', 'field' => 'slug', 'terms' => $instance['tax_1'], ), array( 'taxonomy' => 'tax_2', 'field' => 'slug', 'terms' => $instance['tax_2'], ), ) )); if( $profiles->have_posts() ){ while( $profiles->have_posts() ){ $profiles->the_post() //do your display here... } } wp_reset_query();

Hope that helps you.

Regards

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

I think it is actually after every $4000 cumulative sales http://prntscr.com/6mcd90

140 posts
  • Has been part of the Envato Community for over 1 year
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
DJMiMi
says

Huraaaay I’ve reached first milestone with 1000 sales.

Next stop, elite author by the end of the year \o/

Thank you all \o/

by
by
by
by
by
by