Adding profile data to database

To show extra fields in profile, use this hook: function myplugin_show_profile_extra_fields( $user ) { // echo your extra fields here } add_action( ‘show_user_profile’, ‘myplugin_show_profile_extra_fields’ ); add_action( ‘edit_user_profile’, ‘myplugin_show_profile_extra_fields’ ); And to save extra fields use following hook: function myplugin_save_profile_extra_fields( $user_id ) { if ( !current_user_can( ‘edit_user’, $user_id ) ) { return false; } update_usermeta( $user_id, … Read more

WordPress very high load when click “Publish”

Your problem is in the size of your site. You have huge site and now it’s not enough to have only W3 Total Cache plugin for caching. During publishing post, WordPress performs a lot of database calls, it updates some information about posts in database. So I can suppose that the weakest spot is in … Read more

Carousel Hover Image

I figured it out!! I added this piece of jQuery: <script type=”text/javascript”> <!– $(function() { jQuery(“.photos a”).hover(function() { var offset = $(this).offset(); var id_post = $(this).attr(“id”); jQuery(“.hover”).find(“span[id=”+id_post+”]”).css(“left”, (offset.left-312)+”px”); jQuery(“.hover”).find(“span[id=”+id_post+”]”).show(); }, function() { jQuery(“.hover”).find(“span”).hide(); }) }); //–> </script> and added an additional loop: <div class=”hover”> <?php query_posts( ‘category_name=photos&posts_per_page=-1’ ); ?> <?php if ( have_posts() ) : … Read more

how to include other jquery file and css file in wordpress plugins

You should use this snippet inside your function: wp_register_style(‘mycss’, WP_PLUGIN_URL . ‘/whatever.css’); wp_enqueue_style(‘mycss’); Then you add this add_action after your function, to call your the CSS in the : add_action ( ‘wp_head’, ‘your_function_name’); For javascript, use wp_register_script() and wp_enqueue_script() instead. WordPress function reference: wp_enqueue_style and wp_enqueue_script

Redirect Loops Problems

Firstly I would say, revert to a backup. Then, never use PHPMyAdmin to edit posts, in fact, uninstall PHPMyAdmin, and use a tool like mysql workbench or query browser Finally, never use youtube embed codes, to correctly embed a youtube video, put the URL to that video in your post on its own line ( … Read more