Contact form 7 select box different value-text than content-text in option [closed]

It looks like this is supported by Contact Form 7 natively, it’s just not very obvious on how to make it happen. Here’s a documentation page explaining the functionality: http://contactform7.com/selectable-recipient-with-pipes/ Basically, all you have to do is put the values like so: “Visible Value|actual-form-value” What comes before the pipe | character will be shown in … Read more

Can I upgrade a plugin to a specific version?

Using WP-CLI you can specify this as described in the official documentation. $ wp plugin update <plugin> Using either of the following arguments –minor Only perform updates for minor releases (e.g. from 1.3 to 1.4 instead of 2.0) –patch Only perform updates for patch releases (e.g. from 1.3 to 1.3.3 instead of 1.4) –version=<version> If … Read more

How do i know the current post type when on post.php in admin?

add_action( ‘admin_init’, ‘do_something_152677’ ); function do_something_152677 () { // Global object containing current admin page global $pagenow; // If current page is post.php and post isset than query for its post type // if the post type is ‘event’ do something if ( ‘post.php’ === $pagenow && isset($_GET[‘post’]) && ‘post’ === get_post_type( $_GET[‘post’] ) ) … Read more

How to customize woocommerce related products? [closed]

Firstly, you can’t immediately achieve the goal you described with the code you show in your question. To understand why there isn’t a direct approach with that code you have to take a look at what you’re using – woocommerce_related_products() – to do what you have done so far. Secondly, you have to understand, because … Read more

How to add field for new site-wide option on Network Settings screen?

There’s a wpmu_options action that lets you append more HTML on the Network Settings page. If you want to add your own sub-menu/page to the Settings parent menu: add_action(‘network_admin_menu’, ‘add_my_netw_settings_page’); function add_my_netw_settings_page() { add_submenu_page( ‘settings.php’, ‘Co za asy’, ‘Co za asy’, ‘manage_network_options’, ‘my-netw-settings’, ‘your_form’ ); } function your_form(){ $options = get_site_option(‘your_plugin’); ?> <form action=”<?php echo … Read more