The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
14 views

How to delete Passwrd Protected posts cookies when a user logged out from the site

I wanted to delete all the cookies set for password protected posts when user logged out from the site after going through those Password protected posts. Is there any function to do this?
4
votes
1answer
124 views

Keep one user logged for a year?

This has got to be simple: how do I keep one user - my-user - logged in for a year? (I'm checking logged in cookies in the dev tools console). Update 8/16/15 This works: add_filter( ...
1
vote
0answers
12 views

Session Expired when WordPress Address (URL) and Site Address (URL) are different

I followed this article to allow me to put our company's WordPress blog on a subdirectory of our Heroku hosted site: http://nicolasmlv.com/wordpress-in-your-rails-app/ This says to add this code to ...
1
vote
1answer
36 views

How to switch css files according to devices and button click?

I am trying to enqueue a responsive css file if the website is opened on mobile devices. Also I want to switch / enqueue a default or non-responsive css file when a button is clicked. The ...
3
votes
1answer
77 views

Display message once per session to users with a specific role

I need to display a message to only users with a specific role. The message should appear either as soon as the user logs in or if they re-open their browser after having closed it when logged in to ...
0
votes
1answer
39 views

Use WP_Query Data In Cookie

I've collected an array and set-up a cookie via functions.php, both work fine. However, I really need to post the data to the function and set the cookie as this information will vary per customer. ...
0
votes
1answer
35 views

Using Cookie Data For WP_Query Loop

I'm trying to retrieve data set in a cookie and use this to run a query. I've set the cookie in functions.php like so; add_action( 'init', 'resultsCookie' ); function resultsCookie() { ...
0
votes
1answer
10 views

Opening protected page with cookie?

I'm working on an app that uses WordPress for user management. After login, the app holds the auth cookie. How can I use that cookie to open a web view of a protected page within the app without ...
1
vote
2answers
71 views

can we share user login in 2 wordpress installs in 2 subdomains on one server?

We have 2 WordPress sites in 2 different sub-domains like test1.abc.com and test2.abc.com . Both sites have wp-require plugin activated and only logged-in users can see the site. We want to make a ...
2
votes
1answer
58 views

Setting cookies in Wordpress

I am trying to set a cookie on my site and wanna switch the style sheets using this cookie. I've tested a normal function but it does not work. I've put below code into my functions.php ...
1
vote
1answer
43 views

How to set cookies to switch style sheets when a link is clicked and set it till another particular link is clicked?

I have a very old site. Now I want to make it responsive without changing the theme an it's style sheet. Requirements: Can not change the theme. Can not create child theme. By default, the site ...
0
votes
0answers
84 views

Setting a cookie in functions.php and it gets deleted when working on an other function

My first function gets the parameters from the URL and sets the cookies: /** Get variables from the URL and set them into the coockie **/ add_action( 'init', 'set_utm_cookie'); function ...
1
vote
0answers
22 views

What is the purpose of having a token in cookies?

WordPress utilizes cookies for better security, and I've been trying to understand how exactly this could make a WordPress website more secure, and I found this article . There's a pretty decent ...
0
votes
0answers
27 views

Check for cookie (from another site), then do redirect if detected, do nothing if not detected

I've been working on this for a few days. Tried implementing solution via functions.php but I keep coming up with the problem of infinite loop because naturally the redirect (if cookie is detected) is ...
1
vote
0answers
110 views

How does the “authentication unique keys and salts” feature work?

I'm trying to find some information on how the authentication keys and salts work in WordPress, but unfortunately I wasn't able to find anything useful. All I got is that the keys should be random, ...
0
votes
0answers
172 views

Cookiechoices.js keeps reappearing without caching plugin

If you visit my site, there's a notification about cookies that you can click away and then it shouldn't reappear (maybe until you empty your browser cache). It used to work. I got the javascript ...
0
votes
0answers
25 views

Public page exposing wordpress cookies policy

I'm not interested in installing a plugin to show a popup that inform user with message: 'This website use cookie...'. In order to respect italian cookie law i should expose a link for each third ...
2
votes
2answers
116 views

Get user ID after logging in

I've been asked to add a sort of safety mechanism to a site where a user can only access their profile if they have a cookie set after logging in, and they can only have a maximum of 3 cookies. I've ...
0
votes
0answers
104 views

Set cookies based on visitor choose (first time visit site)

i am working on solution to set cookies based on visitor choose. when the visitor first time visit my site, popup uppers with "select branch". so when the visitor select the branch i make the ...
2
votes
1answer
84 views

jQuery cookie not working properly in wordpress

I make my own accordion menu with html + jquery its working perfectly to forth level, then i add a cookie code from net and do some extra work it also work 100% perfectly in html. My complete HTML + ...
0
votes
0answers
67 views

Cookie Domain is preventing Admin login

I just defined a Cookie Domain in my wp-config.php: define( 'COOKIE_DOMAIN', 'http://www.example.com' ); define( 'WP_HOME', 'http://www.example.com' ); define( 'WP_SITEURL', ...
0
votes
0answers
212 views

How can I set and use a cookie on page load?

So I can set a cookie using the below code, and use the cookie I have created when the page gets refreshed problem is I need to set the cookie and use the cookie when the user first loads the sites. ...
2
votes
0answers
107 views

wp_set_auth_cookie() doesn't work in Ajax call

I am trying to create a Facebook JS-SDK based auto login feature. When user is "Connected" passing FbID and aother user data to an ajax function which creates the session cookie. Cookie is created (I ...
6
votes
1answer
248 views

Removing username from the 'wordpress_logged_in' cookie

I am working with a client with some strict security measures. After undergoing security review, we were notified that the user name stored in the logged in cookie, e.g. ...
0
votes
0answers
134 views

is_user_logged_in() not working after domain change

I am relatively new to Wordpress and I recently moved a WordPress website from one domain to another. I went through and fixed all the links and references that I could find. Now my website has all of ...
0
votes
1answer
206 views

Set Short Automatic Logout Time for One User

I am building sites where I secretly give authoring role capability to visitors by auto-logging them into a generic account; they never see the admin bar, and are prevented from seeing the dashboard ...
0
votes
1answer
711 views

Cookie set without HttpOnly flag

I try to add cookie information but i have no result. The tool sends me the same information. I trying to displayed the mention HttpOnly after path parameter => "Parameter : ...
1
vote
0answers
83 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
77 views

Cookie not set error trying to login but only for one site of my multisite installation

As title stated, I've just moved my wordpress multisite install to a server that uses PHP 5.6. Everything went fine except that for one of my subdomain sites, which gives me the cruel cookie error at ...
0
votes
0answers
453 views

setcookie not working when defined with '/' but working if not defined

I have a very strange problem. I have this code in my functions.php. I followed the instructions and placed this code in the functions.php that was available in my theme folder in ...
6
votes
1answer
153 views

Is it possible to transfer a WordPress session to a different browser via query string?

Assuming a user has an existing WordPress session, is it possible to take the 'wordpress_logged_in_[hash]' cookie, encode it in a query string, and resume the session in a different browser? The ...
0
votes
0answers
38 views

Global Signup/Login in two wordpress site some like similar to stackoverflow?

I have two different wordpress installation at two different server one at mydomain.com and other at subdomain.mydomain.com having different database. My question is how I implement global ...
0
votes
0answers
245 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
259 views

wordpress_logged_in cookie not being recognized in htaccess

On my website, I have a system implemented that requires users to login before viewing any files in the wp-contents/uploads folder, specifically pdf's and doc files only. In order to do this, I have ...
1
vote
1answer
280 views

Searching hook to set cookies before <head> and avoid “headers already sent”

I have written a plugin that sets cookies, and need to avoid the "Headers already sent" PHP error by placing the code at the very top before the head section. Themes usually place wp_head just before ...
0
votes
1answer
461 views

How set a cookie from PHP and get it without refresh

I know that when use setcookie() function it create headers, and after refresh it will be available in $_COOKIES, but i need a mechanism to set cookie in this page without redirect, but to be in the ...
0
votes
1answer
45 views

How to make use of Transient API as cookie

I want to use Transient API as cookie, but I want to know if it is the best practice,and how to make transient be unique or per user. Thanks
0
votes
0answers
122 views

setcookie in functions.php does not accept arguments (variables) passed from WordPress page

I have a WordPress installation where a page (Page 1) displays certain fields from a selected user's profile (Not the logged in user but a user they have selected). A PayPal button is used to take a ...
0
votes
0answers
339 views

How to use Cookie or Session php for one page and just a password

I'm looking for to use a cookie with wordpress 4.0 and it doesn't work.( OVH) I have read that Session or Cookie are deactivate by default inside the load.php folder. Somebody could tell me how to ...
0
votes
1answer
225 views

Error : Cookies are blocked or not supported by your browser

I have a multisite WordPress installation. When I am logged in as a super admin from the main website, and go to the dashboard from the main site into another site, it asks me for login details. When ...
1
vote
1answer
232 views

Change in permalink structure made javascript cookie not work correctly

My site needs a mechanism where a user is sent to agreement page when he visits the site for the first time. Once he accepts the agreement, it is saved in cookie. He can browse any page directly after ...
0
votes
1answer
116 views

Cookie with referral URL [closed]

I want to write referral URL to cookie and use it at some point to echo that referral URL on my website. What is the best way to achieve this? Thank you
0
votes
0answers
159 views

W3 Total Cache problem with password protected pages

well w3 total cache plugins is really nice and make my speed of loading more fast but seems Total cache have problem with password protected pages and posts . when the password enter and page load ...
1
vote
2answers
1k 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 ...
1
vote
0answers
181 views

Website Loads Twice Unnecessarily

When I use tools.pingdom.com, I can see that my website is loading twice unnecessarily. The first time www.junkluggers.com is loaded, a cookie is set. Then part way through the loading process, ...
0
votes
0answers
151 views

!is_user_logged_in() fails

Updating to Wordpress 4 has broken this for me, and I'd like to understand how to fix it. The following code should redirect users when they are not logged in : <?php if ( !is_user_logged_in() ) ...
0
votes
1answer
233 views

Creating intro page in wordpress

I am trying to create a very simple "intro" page in wordpress which will display a 5 seconds video introduction and then will redirect to the homepage automatically. I saw that there are many plugins ...
0
votes
0answers
50 views

setCookie before headers are sent?

I was using this code in my plugin to set a cookie if a condition was met, however after updating to Wordpress 4.0 I got the message: Warning: Cannot modify header information - headers already sent ...
4
votes
2answers
178 views

How to Create a Cookieless Domain in Wordpress

How do you create a 'cookieless' domain for WordPress?
3
votes
1answer
323 views

Security error WP 4.0 + WP phpBB Bridge [closed]

so today I updated to 4.0 (glad I had backup). Everything was working fine until I tried to publish a post. There I got Are you sure you want to do this. Also had Cheatin' Uh under ...