It appears I needed to use an earlier hook. Using the wp
or init
action hooks allow me to read the cookie’s value without logging into the admin first.
function output_test_cookie() {
if ( isset( $_COOKIE['test-cookie'] ) )
echo $_COOKIE["test-cookie"];
}
add_action( 'wp', 'output_test_cookie' ); // wp or init is needed
Related Posts:
- How to Layer 7 Load Balance WordPress Backend and Frontend?
- Cookie Domain is preventing Admin login
- Where is function to prevents non logged users access wp-admin?
- Login issue with subdomain installs
- Why WordPress not logout after I have close my browser?
- wp-admin won’t “remember me” in Chrome & Firefox
- Is it possible to tell if a user is logged into WordPress from looking at the cookies which are set?
- Changing Admin Menu Labels
- Is there ANY way to remove comments function and section totally?
- Changing the ‘wp-admin’ URL to whatever I want
- Unit testing in the WordPress backend (is_admin() is true)
- How can I improve the line break handling in the WYSIWYG editor?
- How do I change the login logo URL and hover title?
- js error on post editing page
- How to add a custom metabox to the Menu Management admin screen?
- How to change the wording in wp-admin back-end?
- How to make ajax call in wordpress in right way?
- Add mass action to wp-admin/users.php
- Only allow administrators and editors to access wp-admin
- Bulk Delete Users Error uri too large
- Can you change the main heading of a page in the WordPress admin (without output buffering or JavaScript)?
- wp-admin – save options without refreshing?
- Change the Return URL from the Customizer
- Where can I edit Admin Panel Page file
- How do you modify CSS files via admin panel?
- WooCommerce – filter by featured products in admin
- How to prevent parent admin page from appearring as a child admin page
- How to clone wp-admin and make a new dashboard controlled by your code?
- What is an “Options Framework” for WordPress
- SSL Partially breaking admin panel and elementor
- From 403 error to 500 internal server error
- Only allow administrators and editors to access wp-admin
- Create a admin page in wordpress without admin menus (“wordpress sidebars”)
- Where are the admin notifications stored?
- How to sort comments in the “edit-comments.php” table based on a comment meta field?
- Woocommerce: Add column to ORDERS admin page with items purchased
- How to declutter admin columns
- New wordpress install, what are the reasons the “Install Themes” tab is missing?
- Customise WordPress Update Notice in wp-admin backend area
- wp_comments table really big casuing /wp-admin/edit-comments.php to slowly load
- I get a 404 page on /wp-admin but not wp-login but as soon as I login I get a 404 again [closed]
- I want to disable login of admin (/wp-admin) with email and make it accessible only with username
- password reset link being sent as HTTP?
- How to make the front-end RTL without changing the admin panel language?
- Post.php is blocked by server? How to unblock? [closed]
- WP-Admin shows (1) update but there is no update for plugin, theme or WordPress
- Do I have to face security problems if I changing default role to Contributor
- wp-admin redirects to 404
- Generate PDF using tcpdf from WordPress admin side custom page [closed]
- Editor’s role in WP
- Minimum version for WordPress Backbone
- I accidentally deleted an admin user and all their content is now gone from the site. [closed]
- Detect Featured Image remove while editing post in wp-admin (client-side)
- Cannot log in to the admin, no error message [closed]
- Is wp-admin/about.php required? Can i omit it from my website
- Need help for WordPress User Session Management?
- Create reviews and star-rating for user accounts in wp-admin [closed]
- Disable Admin CP authentication (or auto login)
- can’t access backend while frontend works perfect
- How to add Extra Column of post Status in All post page
- Developer/Designer asking for admin access
- WordPress Child theme fails to override parent theme css
- How to change home page only in WordPress
- User Roles: How to hide a plugin from showing in WP-Admin?
- WP Admin Login keeps redirecting to login
- Admin menu success message
- Pages section (only) not loading after publishing large number of pages
- define two login page url
- Users can login to Website from wp-admin prior to confirmation email
- wp-admin 503 error
- Admin Page access
- Add HTML to custom post type edit page
- WP site after login keeps redirecting to looped url [closed]
- Locked out of site admin after change of URL
- WordPress Redirects to a cancelled domain, need to change it but can’t get to the admin portal
- WordPress Admin Login Issue
- Edit “Not Available” Page
- admin-ajax and external service interaction
- Add admin page to the top of the admin panel
- Admin page changes the $_POST data
- Wp-admin Redirection loop after moving to subdirectory
- Remove menu item dashboard for a unique user
- Reestablishing Automatic and Secure FTP Connection, Primary Domain Change
- Show only childs and grandchilds of certain post in admin
- str_replace in wp-admin
- Admin area is not loading properly
- WordPress logged in but no access to wp-admin
- Changed the path to wp-login and now can’t access WPress dashboard
- Why my login panel has a wrong language?
- Using meta_query in add_query_arg
- Creating another wordpress site as sub-domain of a wordpress site
- Mixed content and expired session issues with SSL and wp-admin
- Limit access to wp-admin but still be able to log in from different locations?
- How to Filter in the “Add Media Popup” to show only “unattached” Media
- Working with post values in the admin panel
- wordpress login blank screen [closed]
- wp-admin blank page after admin login and all security off
- Can a wordpress admin see my failed Login attempts?
- Setcookie not setting cookies anywhere except admin
- Https Website: CSS and JS files load in http and admin page does not load too