New answers tagged

-1

use these: $imgurl = isset( $values['upload_image'] ) ? esc_attr( $values['upload_image'][0] ) : ''; <input id="upload_image" type="text" size="36" name="upload_image" value="<?php echo $imgurl; ?>" /> <input id="upload_image_button" type="button" value="Upload Image" /> if( isset( $_POST['upload_image'] ) ) update_post_meta( $...


0

Try this code after the $bio = wp_insert_post( $my_bio_post ); line: $terms = isset($_POST['my_pet']) ? array_filter($_POST['my_pet']) : 0; if ($terms && $bio) wp_set_object_terms($bio, $terms, 'Cats'); See wp_set_object_terms() for more info and make sure the Cats taxonomy and the terms in your checkboxes is already available.


0

add the following code to active theme. Here I am replacing with [shell] before saving. add_filter( 'content_save_pre' , 'my_sanitize_content' , 10, 1); function my_sanitize_content( $value ) { return str_replace("<shell>", "[shell]", $value ); }



Top 50 recent answers are included