Use WP_Query Data In Cookie

You could try serializing the array so that it becomes a flattened textual representation of the values it contains. e.g. $testArr = [3,4,”test”, 56]; echo serialize($testArr); gives: a:4:{i:0;i:3;i:1;i:4;i:2;s:4:”test”;i:3;i:56;} However, you should probably consider using user sessions for this rather than cookies.

Let WordPress to go opening an external URL

You forgot to add the “http” to the url Try please this: $link = “<a href=”http://”https://wordpress.stackexchange.com/questions/254153/. $_COOKIE[“link’] .”‘>TEXT SHOWN</a>”; You also can adjust and add the http:// to the $_COOKIE itself. If you want that the new link will open in a new tab, add target=”_blank” like so: $link = “<a href=”http://”https://wordpress.stackexchange.com/questions/254153/. $_COOKIE[“link’] .”‘ target=”_blank”>TEXT … Read more

How can I save cookies to members

You can can read the cookie and check if the current user is logged in using get_current_user_id(). If they are just save the cookie value to the user_meta. $cookie_name=””; if( isset( $_COOKIE[$cookie_name] ) ) { $user_id = get_current_user_id(); if( $user_id ) { $meta_key = $cookie_name; $meta_value = $_COOKIE[$cookie_name]; update_user_meta( $user_id, $meta_key, $meta_value ); } }

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