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 ...

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 ...

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.
...

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 ...

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, ...

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 ...

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 + ...

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.
...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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 ...

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
...

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 ...