Auto login after wordpress installation

Your problem seems to be that you hook in too early (aside from the problem that you’re editing a core file), so let’s take a look at wp-admin/install.php: No hooks at all, but at the end of the page when everything was properly rendered, there’s a call for wp_print_scripts( ‘user-profile’ ). And gladly there we’ll … Read more

Add ‘Creator’ User Meta when adding user

//Whenever a user will be created ‘user_register’ hook of WordPress is executed add_action( ‘user_register’, ‘meta_registration_save’, 10, 1 ); //Following function will be called on each user registration and will save the ‘created_by’ information in wp_usermeta table function meta_registration_save( $user_id ) { //logged in user if ( is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $current_id=$current_user->ID; add_user_meta( $user_id, … Read more

Sort posts by multiple meta key values

I think the best way would be to store the complete date-time in one meta field, saving it as an timestamp in the metafield and converting it by php datetime object functions for displaying. Step 1) Create a Metabox with a text input for entering the date + time. You can find a good introduction … Read more

Custom Facebook share button with custom title,url,image in wordpress

After here and there for long i find the solution for above : Replaced above meta tag with below <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘single-post-thumbnail’ ); ?> <?php if($image[0] != “” ){ ?> <meta property=”og:image” content=”<?php echo $image[0]; ?>” > <?php … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)