Renaming/translating “your profile” page

This is more of PHP implementation detail. If you want a precise match you can do something like: if ( isset( $words[$translated] ) ) return $words[$translated]; return $translated; PS you might want to declare $words as static, so that array is reused and not continuously re-created on each function call (which would be a lot … Read more

How do I reset BackWPup?

No, deactivating is not enough. A well coded plugin will normally delete its options/files when it is uninstalled. Others, as an extra feature may offer this clean-up in its own page, but that’s not common. So, you’ll need to deactivate, delete and install again. This can be short-circuited inspecting the plugin’s register_uninstall_hook or uninstall.php file, … Read more

MySQL database migration to WordPress

From technical perspective wpdb->prepare() essentially trickles down to escaping variables with either (depending on configuration) mysql_real_escape_string() or addslashes(). It’s not inherently more or less secure than any other properly implemented escaping routine. It is closer to specifics of WP and configuration it is aware off.

Show Custom Post From Logged In Author

I fixed the issue myself. What i was doing wrong was the query_posts line i had read query_posts( array( ‘post_author’ => $current_user->ID,’post_status’ => ‘publish’ , ‘post_type’ => array( ‘user_lists’ ) ) ); And the correct way should be query_posts( array( ‘author’ => $current_user->ID,’post_status’ => ‘publish’ , ‘post_type’ => array( ‘user_lists’ ) ) );

wpdb get_var is not returning any result (verified mysql query returns only one value)

I guess meta_key is not a number, so you shouldn’t use %d in yous SQL query. $wpdb->prepare( “SELECT meta_value FROM %s WHERE user_id = %d AND meta_key = %s”,$userMeta,$user_id,$practiceKey ); // meta_key = %s not %d PS. You don’t have to escape table name in this way. You can use $wpdb->prepare( “SELECT meta_value FROM {$wpdb->usermeta} … Read more