How to automatically compare date from custom post type with current date and change taxonomy based on a result?

This is pretty straight forward and easy to do with $wpdb and SQL statement the relationship between any post type (custom or not) and taxonomy term (custom or not ) are stored wp_term_relationships table which has object_id and term_id all you have to do is query the record that has the term_id for active1 term … Read more

automation of plugin installations

Check out TGM-Plugin-Activation plugin. TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference pre-packaged plugins, plugins … Read more

Activate and deactivate two plugins automatically at certain hours

Rather than update the database you could write a mu-plugin to intercept reads from the active_plugins option, e.g. function option_active_plugins_akismet_or_yoast( $plugins ) { if ( !defined(‘WP_ADMIN’) ) { $hour = getdate()[ ‘hours’ ]; if ( $hour >= 10 && $hour < 19 ) { $to_remove=”wordpress-seo/wp-seo.php”; } else { $to_remove=”akismet/akismet.php”; } $remove_index = array_search( $to_remove, $plugins … Read more