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
1answer
2k views

Getting an ERROR: Cookies are blocked error when logging in to a site on a different domain?

I am getting the following error: ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress. When trying to login to a network site on a different ...
0
votes
0answers
9 views

Wordpress Multisite One Login For All Subsites

I have a WordPress multisite setup with 40+ sites. (latest WP Version) I'm currently attempting to allow users to login to just one subsite and be logged into all other subsites across the multisite. ...
0
votes
0answers
19 views

Wordpress Multisite Single Login

I have a WordPress multisite setup with 40+ sites. (latest WP Version) I'm currently attempting to allow users to login to just one site through their account and be logged into all their accounts ...
0
votes
0answers
11 views

Error message when I'm on the login page with wordpress: cookies blocked

When I'm on the Login page in production, I've the cookies blocked error. Screencapture: https://www.pythonthree.com/wp-content/uploads/2020/11/cookies-are-blocked-due-to-unexpected-output-...
0
votes
2answers
4k views

Getting a person's username from a wordpress cookie

My friend has a code that will allow users to receive a special key to gain access into into the closed/open beta event for any game they select. When a person is logged in, they can click on a link ...
0
votes
0answers
9 views

Cookie problem with mixed domain and subdomains of a multisite installation

I'm struggling with cookie configuration in wp-config.php when having a multisite hosted on a domain, and sites on others domains, and some in sub domains of other.. like this toto.com fr.toto.com ...
0
votes
0answers
19 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 ...
3
votes
1answer
1k views

$_SESSION variables lost during OAuth callback

When I attempt an OAuth handshake, the first step is a GET call to obtain an access code like so. # Redirect to request authorization code $url = $this->get_authorization_url(); header("Location: ...
0
votes
2answers
644 views

Language switcher for subdomains

We are running a wordpress site with Greek content (political & economical analysis) and we want to set up an English site of our site. The English site will be running on its own wordpress ...
0
votes
1answer
17 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 ...
2
votes
1answer
3k views

Cookie value cannot be read until I've logged into the WP admin

Once logged into the WP admin, I can refresh the front-end and see my cookie's value outputted as "hello world". If I log out of the admin, then refresh my front-end, the cookie's value is now "...
0
votes
1answer
840 views

WordPress load javascript file if something… (after the page is loaded)

I'm having an issue with making a website GDPR ready. It is loading a javascript file for InstraGram that is setting a cookie. I was able to locate where this file is loaded in the plug-in directory ...
0
votes
2answers
38 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'])) ...
1
vote
2answers
696 views

Change the user is logged in cookie name

I have menu items that are set to be shown/hidden depending on if the user is logged in. I would like to change the default cookie name that WP looks for to determine login status. My cookie name is ...
0
votes
0answers
13 views

WP cookie is set but php says is not set and tries to set it again

I have a script that reads a cookie, but if it is not set writes a cookie. But, although cookie is set, sometimes the script returns several 'set cookie' in logs. I can not find why. Some idea? Thanks ...
1
vote
0answers
17 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 ...
0
votes
0answers
13 views

How to create a cookie

Cannot create cookie in single.php, how can I create it? what i want to do function totalView($id){ $count = 1; $check = get_post_meta($id, 'count',true); if(!$check){ add_post_meta($id,'count',$...
0
votes
1answer
24 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....
1
vote
0answers
26 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 ...
0
votes
1answer
3k views

Why WordPress not logout after I have close my browser?

The default login cookie has expiry time as "session", so suppose when I close my browser, I need to login again when I visit wp-admin. But I've found that serveral time I've closed my browser (kill ...
0
votes
0answers
23 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 ...
0
votes
0answers
8 views

wp_validate_auth_cookie interfering on Woocommerce API

I'm with some strange issue. Everything about generating and validating auth_cookies is working fine, but when I validate a cookie anywhere using wp_validate_auth_cookie, the Woocommerce API doesn't ...
0
votes
1answer
967 views

Allow user to select location and then set cookie for location in WordPress

I am needing to allow a user to select a location from a dropdown on the front-end, that then sets a session cookie for that chosen location... any help here? Ok so this is the outlined task: ...
23
votes
8answers
95k views

Can't log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.”

After a server move, I'm unable to log in to my site. I get the "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." error when I try submitting the ...
4
votes
3answers
4k views

Why does it say: 'Cookies are blocked or not supported'?

There are many many many many pages about this issue (and I could keep going). For those who just came here for a solution, then it is: 1) Just try and refresh the page. 2) Try putting this in your wp-...
0
votes
1answer
1k views

Blurry images when loading the page first time

When first time opening http://plenuum.com/ the images are blurry and become sharp only after a Command+R. I've tried but could not fix it with WP plugins. Any idea how to solve it? Thanks (We'...
1
vote
1answer
1k views

After logout browser's back button into twenty sixteen theme profile

I have tried numerous ways to prevent the browser's back button from allowing someone from using it to go back into a visitors logged out profile. The codes I used were supposed to prevent the browser ...
0
votes
2answers
6k views

Wordpress delete cookie

First sorry for my bad english, i'm french. I need to make my website GDPR Friendly, so for this I use the plugin 'RGPD' who give me the possibility to check or uncheck multiples types of cookies. ...
3
votes
1answer
2k views

How to resolve error “Cookies are blocked due to unexpected output.”?

I am facing an error as per below at admin panel login. "ERROR: Cookies are blocked due to unexpected output." I've tried several solutions like, Log checking (No logs are showing in log file) ...
0
votes
1answer
1k views

$_SESSION variable not saving on page refresh or new page

So I have a form that allows the user to select a city. Once selected, this city is then saved to a $_SESSION variable as such : $_SESSION['city_selected'] = $_POST['location_select']; This works fine ...
0
votes
0answers
69 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 ...
0
votes
0answers
27 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...
0
votes
1answer
988 views

How to login a user with wp_set_auth_cookie on a specific blog within a multisite environment

How can you leverage wp_set_auth_cookie to programmatically login a user on a specific blog in a multisite environment? wp_set_auth_cookie doesn't allow you to set the target blog to authenticate the ...
1
vote
1answer
1k views

Login problems on multisite installation with different domains

I have a subdomain multisite installation in site.com, with subsites such as sub1.site.com, sub2.site.com etc. I needed to transfer one of these sites to an own domain, sub1.com. So I changed the ...
0
votes
0answers
12 views

Display value of the GET parameter in a new URL page

Here's what I'd like to achieve: retrieve the GET value of its parameter from http://mysite/testing/?name=302Beep store it in a cookie redirect to http://mysite/dashboard display '302Beep' in http://...
0
votes
1answer
119 views

Setting a JSON web token from a secondary api as a secure cookie on WordPress

UPDATE THREE Since I am getting the correct responses from my own api, can I modify the responses I am getting. In the console I see this: {readyState: 4, getResponseHeader: ƒ, getAllResponseHeaders: ...
2
votes
1answer
945 views

How to build a plugin that supports authenticated POST requests to the REST API from external servers?

One of the main purposes of an API is to allow the integration of different services/systems. Let's consider that the WordPress REST API can have both public and protected endpoints, where public ...
1
vote
1answer
39 views

SSO autologin Wordpress + Ajax

That one keeps me awake at night. The problem is that the user is properly logging in, but AFTER page refresh and should be immediately logged in without page reload. Need a fresh eyes to look at it. ...
0
votes
4answers
2k views

Setting Cookie with init hook causes 'header already sent'

Based on research here and elsewhere, I have the following code that sets a cookie on a site: add_action( 'init', 'my_set_cookie',1 ); function my_set_cookie() { if (! $_COOKIE['mycookie']) { ...
5
votes
1answer
1k views

Disable saving comment details (name, e-mail) in cookie?

The European Union has introduced a directive requiring that websites obtain permission for setting all 'non-essential' cookies. In the UK (where my site is based), the appropriate detail is explained ...
9
votes
1answer
8k views

How to share cookies and sessions between domain and subdomain?

I have missed a lot of time by searching answer to my question. For today I have two WP installations on the one server and one DB but with different prefix. I already shared users data and meta ...
0
votes
1answer
22 views

Is it possible to use cookie-free domains in WordPress?

Is it possible to do it manually or is there any plugin? Or I must use CDN like Kinsta? (Now we use CloudFire). Thanks for any answers!
14
votes
5answers
54k views

Setting custom cookies in Wordpress

I am trying to set cookies to re-route returning users to my a specific page within my Wordpress site. I'd like some advice with these 2 things: Where in the Wordpress php files should cookies be ...
0
votes
1answer
28 views

Remember language choice on multisite website

I have a multisite website with 3 websites representing 3 languages. On my network website https://example.com I have a page with 3 language choices linking to https://example.com/nl?language=nl, ...
0
votes
0answers
29 views

How to run code when cookie is added?

So I have the code below, and its purpose is to prevent the Facebook for Woocommerce plugin from running the FB pixel until the necessary consent is given. It works to solve the problem in the sense ...
1
vote
1answer
139 views

Why is my staging subdomain not sending wordpress_logged_in cookies?

We have a custom login and account creation plugin. It works fine on our live environment (example.com) but not on our staging environment (test.example.com). When we call wp_insert_user via an AJAX ...
3
votes
2answers
5k views

Share WordPress Login Cookies Between Two Subdomain Installs

I have two wordpress installs each on their own sub domain. sub1.domain.com and sub2.domain.com I want to share the login information between sub1 and sub2. I already have configured them to use the ...
0
votes
1answer
136 views

How to generate the COOKIEHASH from JavaScript

The overarching question How do I get the contents of the PHP-variable: COOKIEHASH inside a Cypress-test. I'm writing some Cypress-test for WordPress, and in order to set the cookies to log in a user ...
0
votes
0answers
45 views

Use WP cookie to authentificate user on an external app

Is it possible to authentificate a logged in WP user by it's wp auth cookie from an external app (simple JS webapp on a different domain)? The setup is: My webapp is on domain.com/generator/ The ...
0
votes
0answers
25 views

Storing session variable without interfering with Varnish

I have a form (www.example.com/form) that submits to a 3rd party app to add users to a contact list. The vendor does not provide any means of using AJAX, rather they allow you to specify a URL to ...

1
2 3 4 5
8