How do I add languages?

I’m using Buddypress. I just want to add some kind of language tool that syncs (or updates) with the official WordPress website’s translations for plugins Plugins should come with all their language files already, all it requires is setting the language of your site which is done on install. That will set which language the … Read more

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

Simple Data picker meta box

No ones was answering so i installed this plugin MetaBox.io and I’ve generated this code below that worsk very vell. function arrivo_metabox( $meta_boxes ) { $prefix = ‘arrivo-‘; $meta_boxes[] = array( ‘id’ => ‘arrivo’, ‘title’ => esc_html__( ‘Data di arrivo in negozio’, ‘porto-child’ ), ‘post_types’ => array( ‘riparazioni’ ), ‘context’ => ‘side’, ‘priority’ => ‘default’, … Read more