Insert Extra fields added in the front end registration form to DB

Why the downvotes for using user meta? That’s how I do it, I store all the extra profile stuff in wp_usermeta table by utilizing update_user_meta. <?php // first validate all $_POST data $validated = $this->validate_and_sanitize(); $username = $validated[‘uname’]; $password = $validated[‘pass’]; $email = $validated[’email’]; $new_user_id = wp_create_user($username, $password, $email); if ( is_wp_error($new_user_id) && array_key_exists(‘existing_user_login’, $new_user_id->errors)) … Read more

Get the url of attachments from the post?

I think you’re going about it the wrong way. You can use get_posts to get the attachments of the current post: $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ =>’any’, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) { foreach ( $attachments as $attachment ) { echo apply_filters( ‘the_title’ , $attachment->post_title ); … Read more

What is best for saving lot of extra detail of user?

You can store multiple pieces of data within a single field by passing an array rather than a string: $user_data = array( ‘favorite_color’ => ‘blue’, ‘favorite_animal’ => ‘cat’, ‘favorite_city’ => ‘paris’ ); update_user_meta( $user_id, ‘user_data’, $user_data ); WordPress will serialize this data for you on save, and unserialize back into an array when it is … Read more

Is there a plugin that will override the “Error establishing a database connection” message? [closed]

http://yoast.com/custom-wordpress-database-error-pages/ You can make your own Database Error page by adding a db-error.php to your wp-content folder (/wp-content/db-error.php). You can find a good example of such a page in the link above. Don’t forget adding header(“HTTP/1.0 500 Internal Server Error”); in that file so it get a proper header message.