My posts section for logged in user

You don’t need to put your code in your theme functions. This needs to be a custom page template. Learn about page templates here: http://codex.wordpress.org/Page_Templates Your code is custom loop so you need to also learn about loops and then using WP_Query so next stop will be here: http://codex.wordpress.org/The_Loop Then read this page: http://codex.wordpress.org/Class_Reference/WP_Query After … Read more

Migrating Users along with their password

I imported the 2 tables in the target database and faced permission issue while logging in to the target site , then I followed this site http://beconfused.com/2007/how-to-solve-you-do-not-have-sufficient-permissions-to-access-this-page-in-wordpress/ and it fixed the issue.

Adapting a php array to WordPress

Here is some code; you need to see that the $current_user variable is actually an object and not an array ( USE $current_user->user_login AND NOT $current_user[‘user_login’] ). I also added a simple check to make sure the user is logged in. // Set the Query POST parameters – array $query_vals = array( ‘api_username’ => ‘api-username-goes-here’, … Read more

Get current user array with post string

Your code has a lot of errors. For example, inside you should define the global $current_user, not outside. Other error, you use $query_vals variable outside the function where that variable is not defined. Anyway, I would use the function wp_get_current_user() which have not to be called before init action hook. For example, if you are … Read more

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