link variable to user

To expound on Chris’ answer, the AJAX call would look something like this in your functions.php file: add_action(‘wp_ajax_add_favorite’, ‘add_favorite’); function add_favorite(){ $post_id = $_POST[‘postID’]; $nonce = $_POST[‘nonce’]; if(!wp_verify_nonce($nonce, ‘wpnonce’)) exit; if($post_id): $favorites = get_user_meta(get_current_user_id(), ‘favorites’); if(in_array($post_id, $favorites)): $response=”Already in favorites.”; $success = false; else: if(add_user_meta(get_current_user_id(), ‘favorites’, $post_id, false)): $response = “This post was added to … Read more

Is there a way to rate users instead of posts?

I would create a custom table that stored a) the user doing the rating b) the user being rated c) the rating d) the time of the rating. Between these 4, you should be able to store, aggregate, and effectively query your data with very little overhead or PHP processing. update note: this is pseudocode … Read more

Cannot Modify Header Info Error on updating User Profile

It is usually because there are spaces, new lines, or other stuff before an opening tag, typically in wp-config.php. This could be true about some other file too, so please check the error message, as it lists the specific file name where the error occurred (see the link below for more info on “Interpreting the … Read more

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