Make a plugin work on specified domain only

You could use a combination of the file content and the domain to create a unique hash. Example: $md5 = md5( file_get_contents( __FILE__ ) . $_SERVER[‘HTTP_HOST’] ); if ( ‘be5d38f32a5d4a897e6c878f0c2f1b14’ !== $md5 ) deactivate_plugins( plugin_basename( __FILE__ ) ); Additionally, you could check each week per remote request to your server, if the hash is registered … Read more

Add values of post meta fields?

You can put the meta value of each post within an array while inside loop. Then just calculate the average of the ratings after the loop ends. for getting meta values you can see this link Function Reference/get post meta

How to insert a variable into a query parameter?

Errr, are you talking about this: $variable = get_field(‘loop_category’); $args = array( ‘category_name’ => $variable, ); $catquery = new WP_Query($args); while ($catquery->have_posts()) { $catquery->the_post(); // Do your thing } If so, this is basic PHP and has nothing to do with WordPress – even though this is used in its context.

Extract array from custom field

This is mostly pure PHP, but you need to implode the array. add_shortcode(‘bundled_ids’,’bundled_ids_func’); function bundled_ids_func() { $meta_values = get_post_meta( get_the_ID() , ‘_bundled_ids’, true ); if (!empty($meta_values)) { $mydata = implode(‘,’,$meta_values); // add this line return $mydata; } }

Using the wp_remote_post response body

Your question doesn’t make a lot of sense. The submission works but I get the returned URL as an HTML stream in $response[‘body’] but I cannot seem to get any query string values from it. That is what is supposed to happen. You requesting a web page just as when you click a link in … Read more

Changing comment_count to views

Yes, you have to calculate page views. Do not use plugin as it needs a small piece of code. Below code will increase pageviews and will store in post meta. Use this code in single.php or loop-common. if( is_single() ) { /* Increase post view count by 1 */ $post_view_count = get_post_meta($post_id, ‘view_count’, true); if( … Read more