Redirect to another page using contact form 7? [closed]

Redirect to another page using contact form 7? [closed]

Custom “radio button meta box” not saving correctly

The error is in you saving function where you are looking for $_POST[‘meta_box_musicreleases_linktype’] which is never set and should actually be $_POST[‘linktype’], and the use of wp_kses is not right here, if you want to validate the data and you know all of the accepted values the you can simply use in_array try: add_action( ‘save_post’, … Read more

Split the_title

The best way to go about it is using the the_title filter. Put the following code in your functions.php. add_filter( ‘the_title’, ‘wpse_64467_prefix_title’, ”, 2 ); function wpse_64467_prefix_title( $title, $id ){ $header_title = get_post_meta( $id, ‘header_title’, true ); $title = ( $header_title ) ? $header_title . ‘ – ‘ . $title : $title; return $title; } … Read more

Display Custom Field for a Specific Role, but not for Admin

You can use the WP_User class and the has_cap($role) method. The show_user_profile action passes a WP_User object as a parameter to the called function. http://codex.wordpress.org/Class_Reference/WP_User#has_cap.28.24cap.29 add_action(‘show_user_profile’, ‘my_add_extra_profile_fields’); function my_add_extra_profile_fields($user) { if ($user->has_cap(‘subscriber’)) { //Code here } }

How can meta boxes be added to “unknown” custom posts?

I’m not sure what you mean by “unknown custom posts”, but here is how you’d add a meta box to a number of post types: $post_types = array( ‘post’, ‘page’, ‘my_custom_post_type’, ); foreach ($post_types as $post_type) add_meta_box(‘Intro’, __(‘Intro’), ‘my_meta_box’, $post_type, ‘normal’, ‘high’); If you would like to have different contexts and/or priorities, you have to … Read more