As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [cookies]

An HTTP cookie is a small piece of data sent from a website and stored in the user's web browser while the user is browsing it.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Platform sh site setup in localhost gets Cookie error

I have setup up a WordPress project from Platform sh in my local host. I get get the project by using the platform get [id] command. I Imported the database in my localhost and configured the wp-...
tek bhatt's user avatar
0 votes
0 answers
17 views

Setcookie not setting cookies anywhere except admin

I want to set various cookies from the URL query string. I am checking for the GET values and then printing the desired values and then trying to set the value in the cookies. function on_page_load() {...
Varun's user avatar
  • 1
0 votes
0 answers
23 views

How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?

cookie --> wordpress_logged_in -- admin%7C1684489617%7CTdPaXlizvGyWpJNhCrB8pUcX4725Lrte2OIOnKD3XSx%7Cfca768d6ff2014aefad62fc253b715926c8a907c05231182ba2f1c580836c2a4
Miguel Angel Salas8's user avatar
0 votes
1 answer
30 views

How do I modify each instance of setcookie?

I have an internal WordPress site that I'm trying to embed via iFrame. Currently, I'm stuck on: Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. ...
Kermit's user avatar
  • 146
0 votes
0 answers
5 views

WordPress MU: Cookie error when trying to login on network WP instance

I get a Cookie error when I try to login to a WPMU site in a subdomain-based network installation. I would like to give more relevant details, but at the moment I don't have any clue where to dig. Can ...
winnewoerp's user avatar
0 votes
0 answers
25 views

How to set and retrieve cookies while in the loop

While inside the loop, I need to do some calculations with latitudes and longitudes to create a delivery fee based on a distance for each post. I have a couple hundred posts, but will only have about ...
Eric Wenger's user avatar
0 votes
0 answers
9 views

I can't log into my website , it says "Error: Cookies are blocked due to unexpected output"

I have seen others with this same problem but when I google it it resolves it in a lingo I don't understand. I need a simple answer.
Tony Morgan's user avatar
0 votes
0 answers
102 views

Wordpress Network / Multisite login to one site allow access to all

I have a wordpress installation that uses wordpress network (which I think was previously known as Wordpress Multisite). I have the following sites setup, http://www.example.com/uk http://www.example....
sico87's user avatar
  • 209
0 votes
0 answers
37 views

Losing Session ID and sessionStorage when navigating to other domains on Multisite

I'm working on a WP Multisite install with the following directory structure: The site on main-domain.com has navigation links that open the "ebar.com" and "efoo.com" sites (which ...
sacredfaith's user avatar
0 votes
1 answer
331 views

PHP cookie not set within AJAX call

I'm trying to set a cookie within an AJAX call after I get the response of an API. The API and AJAX call are working fine, but the cookie is not being set. I used the 'COOKIEPATH' and 'COOKIE_DOMAIN' ...
Loosie94's user avatar
  • 211
-1 votes
1 answer
142 views

Wordpress keep logged in after browser close

I want my users to be logged in even after they close the browser. I have tried below code but nothing happens, it still logging me out after closing the browser. function keep_me_logged_in_for_1_year(...
Souvik Das's user avatar
0 votes
0 answers
21 views

Keep users logged in Without Remember Me

Currently users are logged out right when their browsers close and/or if remember me isn't checked. Is there a way to keep users logged in even when their browsers close? I'd like to keep them logged ...
sevenkader's user avatar
0 votes
0 answers
10 views

Why do i get this fatal error? Fatal error: Uncaught ValueError: setcookie(): "path" option cannot contain ",", ";", " ", "\t", "\r", "\n", "\013",etc [duplicate]

I accidentally changed the url of my wordpress page, which I finally managed to restore in phpmyadmin, the first page of my website works, but the second page doesn't, and I can't even log in to the ...
Svicc's user avatar
  • 1
0 votes
1 answer
251 views

Why can't I enter the wordpress admin interface?

I accidentally changed the url of my wordpress page, which I finally managed to restore in phpmyadmin, the first page of my website works, but the second page doesn't, and I can't even log in to the ...
Svicc's user avatar
  • 1
0 votes
1 answer
32 views

Modify the third (context) parameter in a filter?

I understand that the following filter modifies the parameters of the authentication cookies, in fact I have managed to modify its value since it is the first parameter $cookie, but what I need is to ...
truemar's user avatar
0 votes
1 answer
71 views

Rest Api Wordpress

I wrote little plugin and I tried to use Rest Api of Wordpress for to communicate admin page to my rest. My problem is : failed rest_cookie_invalid_nonce, return 403 always. My ajax call : const ...
tecnico57's user avatar
0 votes
0 answers
18 views

What are the issues using the Test Cookie Fix?

While login, I was getting this error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress If I try again to log in, then I can log in! When I searched for ...
akhilaniyan's user avatar
0 votes
1 answer
168 views

Multiple issues with Ajax login function due to browsers and cookies

Using basic usage of ajax login wordpress, no cookie wordpress_logged_in_ are created on safari and Chrome and firefox doesn't read user when cookie "wordpress_logged_in". I have several ...
imagIne's user avatar
  • 11
0 votes
1 answer
114 views

Authorize subdomain to access and read user and admin cookies

My subdomains redirect alls in the main domain . I am the admin. We can access to my website by the main domain or subdomain. I use that to share cookies between domain and subdomain : There is no ...
imagIne's user avatar
  • 11
0 votes
2 answers
50 views

Cookie error. No possibility to define my cookie

I'm looking to set a cookie for one of my WordPress applications. Despite my research, I can't find why WordPress ignores the creation of the cookie. Here is my code place in my app. What do you think ...
Geo's user avatar
  • 1
0 votes
0 answers
19 views

Is there something I need to know in order to use Wordpress on foreign (Swedish) TLDs?

So I have a wordpress multisite site for a client who moved to to Sweden from the US recently and has since contracted my for 4 more websites to go to urls with the Swedish TLD (.se). I'm able to ...
Tara's user avatar
  • 101
1 vote
0 answers
18 views

Modifying request $_COOKIE

I have setup some conditional logic within a WP theme to display certain sections based a cookie value. I am trying now add some logic to override that cookie value in the request itself, based on a ...
mike_temby's user avatar
0 votes
1 answer
17 views

Cookies set by a plugin in wordpress for tracking

We have our companies website on a wordpress-multisite-installation with some plugins: All-in-One WP Migration All-in-One WP Migration Multisite Extension Better Search Replace HTTP2 push content ...
Zehke's user avatar
  • 1
0 votes
0 answers
12 views

Multisite cookies are being shared across domains unwanted

Setup I have a multisite that consists of 4 domains .com .de .co.uk and .fr each has its own sub directory and none of them are linked to each other in any way apart from theme code. Problem each has ...
Brad Holmes's user avatar
0 votes
0 answers
13 views

Codeless random token generation to pass into multiple tracking links in a single page load

In domain my-nice-company.com (my WordPress) I want to include traking transparent images to some-tracker.org/1x1-transparent.png and some-other-tracker.info/track/pixel.jpg I want to pass-in a ...
Xavi Montero's user avatar
1 vote
0 answers
48 views

How to combine wordpress_logged_in cookies in one cookie?

I'm trying to optimize my server to consume less resources as possible and increase overall performance. In my site I don't see a need to recompute same requests for users or guests every time. The ...
AtomX's user avatar
  • 109
0 votes
1 answer
92 views

setcookie on WordPress Page Template

I am having an issue with setcookie. I need to set a cookie on a page action (form). I have tried on the template file, but not working. then find out if I set it from functions.php with init hook, it'...
Sarequl Basar's user avatar
0 votes
1 answer
29 views

How can I create network with different domains?

I have heard similar questions posed but not exactly what I am looking for. Is it possible to create a multisite with different domains and sub.doamins? For example, can I create a network that allows ...
John Crockett's user avatar
1 vote
0 answers
380 views

Log in user using Wordpress REST API

I am having problems authenticating a user after logging in using a custom endpoint using the WordPress REST API. I'm aware that this is not the perfect approach but I am just trying to make a few ...
Courtney's user avatar
  • 153
1 vote
1 answer
65 views

Why wordpress cookies name contains HASH

As documented here, wordpress cookies name have HASH part. I wonder to know what is its use-case?
Mohammad Ali Akbari's user avatar
0 votes
1 answer
33 views

Favicon not loading until cookies are accepted?

I'm seeing a weird issue where my site's favicon is not loaded until I accept cookies on a cookie plugin. I wrote the plugin and as far as I know there is no tie of a favicon to cookies and the ...
Hunter Nelson's user avatar
0 votes
0 answers
60 views

How to verify which WordPress user requested the API in ASP .NET Core?

I have a use-case where I have a WordPress site and an ASP .NET Core as a Restful API backend. I use the WordPress site entire for Frontend, CMS, and User Authentication. On certain pages of my ...
user2672399's user avatar
1 vote
1 answer
71 views

Sharing a logged in session with a custom subdmain site?

I'm trying to share a Wordpress login between a typical Wordpress installation and a secondary (custom/PHP) site that will be on a subdomain of the Wordpress site. A user should be able to register on ...
Thumbs's user avatar
  • 11
0 votes
0 answers
650 views

Fatal error login Wordpress [duplicate]

When I want to login to my wordpress this appears: Fatal error: Uncaught ValueError: setcookie(): "path" option cannot contain ",", ";", " ", "\t", &...
Joshua Mart's user avatar
0 votes
0 answers
75 views

Setup cookie on Chrome even without HTTPS

I need to setup a cookie, however Chrome lately seems to accept them only through HTTPS. The "setcookie" function I use works everywhere except Chrome. If I move to HTTPS, it results as ...
a-coder's user avatar
  • 390
0 votes
0 answers
161 views

Change auth_cookie_expiration for specific roles and specific login times

In my db i have a login counter that keeps a number value as a record (1,2,3,4,5...)every time a user from a specific role logins. I am trying to change the auth_cookie_expiration to 1 day for ...
Honoluluman's user avatar
0 votes
0 answers
67 views

PHP cookie control does not work correctly

I created a custom cookie banner for my WordPress site and it works perfectly. However, now I have a small problem. With PHP I'm trying to make it invisible to users who have already accepted it. To ...
Matteo Feduzi's user avatar
0 votes
0 answers
349 views

How can I get an updated cookie in header.php?

I have trouble with getting an updated cookie. For example, I create a cookie like this in functions.php: function set_menu_id_cookie() { setcookie('menu_id', 1000, 2147483647, "/"); } ...
Roland's user avatar
  • 101
0 votes
2 answers
1k views

Setting a Custom Cookie in WordPress only for Logged In Customer/User (non-admin)

I want to create a custom cookie with custom name only for customers who have once logged in. It should be created after they successfully logged in. It should be deleted after they logged out ...
baazigar's user avatar
0 votes
1 answer
350 views

Cookie value changes back to previous value after changing

I have this custom pligin that im using in order to save the user's language preferences. I store it as a cookie like so: <?php add_filter( 'init', 'aws_set_language_cookie', 999 ); ...
user206592's user avatar
2 votes
1 answer
2k views

What is cookie "U" from domain ".adsymptotic.com" found on the WordPress page? [closed]

On a landing page of our WordPress site, I find a cookie "U" from domain ".adsymptotic.com" as the image below shows. Could you please let me know where this comes from because ...
CodeForGood's user avatar
0 votes
0 answers
744 views

When is the wp-settings-[time] cookie generated?

I created a custom plugin for login and registration forms. When I log in for a new user, 4 cookies are set : PHPSESSID, wordpress_test_cookie, wordpress_logged_in_, and 2 wordpress_sec_ . But I don't ...
imagIne's user avatar
  • 11
0 votes
1 answer
645 views

How to change WordPress cookies to be session-only

I don't want my WP site to set any persistent cookies. Session cookies while I'm logged in are all I want to allow. I don't want to have to ask visitors for consent, so I need to be sure that none are ...
Synchro's user avatar
  • 101
1 vote
2 answers
713 views

How to implement a $_SESSION alternative in Wordpress inside a theme without a plugin?

I want to show a popup to the first time visitor of a Wordpress site. I tried to check the visit state using $_SESSION. Something like this in the footer.php: <?php if(!isset($_SESSION['pxpop'])) ...
sariDon's user avatar
  • 255
1 vote
0 answers
563 views

How to save generated JWT token to cookies on login?

I'm developing a Chrome extension and I want my users to authenticate via my WP login page. I configured JWT Authentication for WP Rest API. I want the users to go to my website, login, and then have ...
amiregelz's user avatar
  • 111
1 vote
0 answers
33 views

v5.6.2 User cannot stay logged in - wordpress_test cookie placed but not auth cookies

Running WordPress v5.6.2 with a simple Members Only function checking is_user_logged_in() and running auth_redirect() - which has worked fine up to now. Pushed upgrade to 5.6.2 and now any browser ...
George's user avatar
  • 11
0 votes
1 answer
524 views

Why set cookie from URL parameter doesnt work all the time?

I use only "pages" from my WP installation (not posts) and I want to set a cookie based on the existence of a GET parameter in the URL. I have put the following code in the top of my page....
NewGuy's user avatar
  • 1
0 votes
0 answers
203 views

Authentication between two different sites using the WordPress login cookie

Two different WordPress, two different users, same account and password. In this case, if the user wants to go to (A -> B) the B site after logging in to the A site, the session HASH is already ...
Pelmi's user avatar
  • 3
0 votes
0 answers
41 views

How are sites using wordpress hiding wordpress cookies that have "wp" or "wordpress" in the cookie name?

I have looked at some big sites that are running wordpress and not one mention of it in their cookies I am trying to do that with my site...
Joey's user avatar
  • 1
0 votes
0 answers
774 views

Ajax login fails: script sets cookies, but is_user_logged_in() returns false

Summary Ajax request to a back-end plugin PHP script successfully logs in the user and sets login cookies in the browser. However, the page making the call fails to recognize those cookies, and ...
nightowl's user avatar

1
2 3 4 5
8