You can access to any WordPress functions if you first include the wp-load.php
to your custom PHP page.
<?php
require_once('path/to/wp-load.php');
if( ! is_user_logged_in() ) {
auth_redirect();
}
// Your application starts from here...
?>
Related Posts:
- Display message once per session to users with a specific role
- How to store post ID’s in cookie or session to display the same posts later
- iframe does not store session/cookie when refresh parent
- $_SESSION variable not saving on page refresh or new page
- Set cookie parameters on wp site – PHP not working?
- Allow user to select location and then set cookie for location in WordPress
- How to ‘remember’ a site member’s last visited page?
- Call to undefined function get_userdata() in plugin
- Insert custom PHP head above in WP pages
- Unique session WordPress
- get_users meta_query: REGEXP not working for matching new lines
- Change CSS based on is_user_logged_in
- Get my site session in wordpress?
- How to show a users bio on a page
- “operation successful” message
- Having Issue on Redirecting With Session in WordPress
- Unset session variable on page reload / setup but exclude AJAX
- php if username is role
- My php code is not being executed
- How do you create two separate Register pages?
- Is it possible to create new user from external form using REST API?
- Foreach loop inside an array_merge
- $_SESSION variables work perfectly on my local machine but returns NULL on development webserver
- Show current user posts only
- Change page password every day (predictable password ;) )
- show something only when user comes from specific page at remote host?
- Get the users that my following users are following
- The session works on the local server, but not on the web server
- create front-end users post list by specific category
- Custom $_SESSION expires too early
- How to set cookies
- Can we stop session reset if page reloads?
- Store and Change Session variable – PHP SESSION VARIABLE
- Show site content based on user role
- ‘pre_user_query’ interfering with user export
- How to make a cookie be on the whole site instead of being on a specific page/
- php return username of currently viewed author profile
- Set cookie for visitor
- Authentication from sub-folder non-wp cookie WordPress
- setcookies and header send
- How to list users like an archive page 10 users on page and have navigations
- How can I call a specific file (via php) by referencing the logged-in username?
- Redirect to current user page upon link click
- Use of antispambot with $curauth->email
- Uses for function: wp_update_user
- Display additional user fields
- Deleting expired session tokens in WordPress
- PHP: $_SESSION destroyed after page reload for my custom session
- Triggering a timewall after X days
- Generate a QR code when creating a new WordPress user
- Change wordpress’ database data using ajax – how to get current user id?
- Sort new column in Users wp-admin
- Sort column in Users admin Tab
- Are there any drawbacks on opening a session_start in functions.php and header.php?
- Allow a user or role to view drafts and previews, but not other admin privileges?
- Woocommerce display orders with products from specific categories to specific admins
- Storing huge number of users in wordpress
- Fatal error login WordPress [duplicate]
- Admin Panel 404 Error after login
- How to block specific user id in custom login form?
- Get current user id in function php
- Like and Dislike Buttons on Post with Counter – Only allow one click per post per user session
- How to count active users on a specific page
- PHP session not staying alive. headers already sent
- how can I call a function when time expire
- IF statement not working – Any suggestions?
- Hide Approved status for certain users in users list
- Call WP Rest-Api to GET /users/me returned NOTHING in console
- Uploading/integrating custom user registration page
- Login issue with subdomain installs
- If user has clicked link add class and store using PHP/WordPress
- Store data from JavaScript object to custom table in user account
- Sessions with WordPress
- Export WordPress User Meta to CSV/Excel
- Page template not working when logged out
- Allow specific user to edit a specific page
- How to change the value of a variable using input field?
- Display current user metadata on WordPress page
- How do I track which user clicked my button?
- Help hooking into user_register
- Add another role to a user when they click a button?
- How can I store user preferences in WordPress and retreive them later?
- ajax polling with admin-ajax.php
- Query to show average # of months all accounts with specific role have been active
- is_user_logged_in() not working in homepage
- WordPress load javascript file if something… (after the page is loaded)
- Serve cookie free URLs in WordPress without using a CDN
- wordpress more than one ajax request at the same time issue
- (Who to follow) Twitter widget
- Can’t get_users info by using json_encode
- PHP Session Variable to WordPress Error
- Editable Student file associated with basic User ID
- Adding users to another blog
- Changing WordPress author name in database
- Matching multi user
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Updating custom user meta
- Loop 1 user randomly
- Update only some custom user fields
- List users in a dropdown for login