Getting and calculating averge value of custom fields of the same tag

If its a regular custom field you can add this to your archive.php: //before the loop $rating_count = 0; $total_rating = 0; //in the loop $total_rating = $total_rating + get_post_meta($post->ID,’your_custom_field_name’,true); $rating_count = $rating_count + 1; //after the loop: $average = $total_rating / $rating_count; echo ‘the average rating for this tag is: ‘ . $average; Update … Read more

More than one WordPress site using the same database – how to disable plugin for one site?

Hm… In more pure sense of the question I suppose you could filter active_plugins option on retrieval via option_active_plugins filter and throw plugin out for one of the sites. But I won’t try to predict what this can cause to active/inactive state in your situation. 🙂 I think more practical solution would be to figure … Read more

Can two domains use the same database?

No, not in the manner that you’re planning on doing it. Everything relating to the site (including the design, selected theme, etc) is stored in the database. By having a second site attach to it, any changes made there will be reflected on the main site.

Advantages of dbDelta

The purpose of dbDelta() is both to create and update tables. If you don’t need updates then you can skip it. For keeping track of name you can simply follow WP convention and save name of your table in field of $wpdb object. Also note that you should consider there is possibility of code running … Read more