What’s a good way to default behavior if a plugin is inactive?

How about using the WordPress is_plugin_active() function? – https://codex.wordpress.org/Function_Reference/is_plugin_active This is an admin only function though, so to use it in the frontend or within a template file you would need to manually require plugin.php like so: include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); is_plugin_active($plugin); Where $plugin is the name of the plugin sub directory/file eg: is_plugin_active( … Read more

Conditional Fields depending on checkboxes

I’ve written something very similar with Contact Form 7. Instead of a Country -> City relation, the relation is Car make -> Car model -> car year. https://bdwm.be/how-to-create-dynamically-populated-cascading-dropdown-lists-for-contact-form-7/ You could start from a CSV file that looks like this: Country, City Germany, Berling Germany, Stuttgart China, Peking … Then create a contact form like this … Read more

Taxonomy question

The short answer is to get your taxonomy terms using: wp_get_post_terms( $post->ID, ‘yourTaxonomyName’ ); This will return an array of WP Term Objects. Here’s how you would get the first term name: $terms = wp_get_post_terms( $post->ID, ‘yourTaxonomyName’ ); $first_term_name = $terms[0]->name; You can learn more about this method in the WordPress Codex: https://codex.wordpress.org/Function_Reference/wp_get_post_terms Hope this … Read more

How do I override WordPress plugin css [closed]

Assuming you are overriding the Page Builder styles with vc-style stylesheet. Try this.. function vc_override() { wp_enqueue_style( ‘vc-style’, get_stylesheet_directory_uri() . ‘/css/vc_elements-style.css’, array(‘js_composer_front’) ); //visual composer } add_action( ‘wp_enqueue_scripts’, ‘vc_override’, 999 ); View your site’s source to check whether your style is appearing before or after visual composer style.