You may be able to have WordPress push data to the session or to your custom PHP, rather than trying to load WordPress each time you need to query some the user. I’m not sure what other functions you want to call.
The alternative is to use the WordPress REST API, take a look at the authentication section.
Related Posts:
- Get the ID of the page a menu item links to?
- Add container to nav_menu sub menu
- One Child Functions.php for Multiple Child Themes
- Different wp_mail_from and wp_mail_from_name for specific situations
- Disabling pingback and trackback notifications
- register_post_type for Pages?
- Paged Single Post doesn’t redirect to the main url after Removing Pagination
- How to get comments with mixed status using get_comments?
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- How to add .htaccess code through a function?
- Restrict user registration to emails on a single domain
- Call to undefined add_action() in theme’s functions.php
- How can I rename the WordPress AJAX URL? [duplicate]
- How to add a rel attribute to images that contains their categories?
- Is it possible to be more page/post specific with admin_enqueue_script?
- Can I use require() function in a template file?
- What is the most efficient method for loading widgets in functions.php
- Enqueue script o style only if a template part is loaded
- radio button is checked but display not check
- Can I pass two roles to the function get_users?
- Add external js file to footer with id
- password protected post policy
- wp_enqueue JavaScript in child-theme (ReferenceError) using Search & Go
- How can I enable uploading excel files?
- Logout hyperlink within a sub-menu
- Manipulate Permalink
- Change the HTML of the comment form that is generating somewhere from the core WordPress
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Twentyten Child Theme: header images display messed up in admin panel
- How to get the index number of the posts?
- Removing wp_login_viewport_meta
- Get Current Post ID in functions php, meta query filter
- Custom Attachment Caption Fields
- Jquery implementation not working on page reload
- Call WordPress function outside of WordPress
- Move Custom Fields on General Settings Page to New Location
- Remove adjacent_posts_rel_link under 3.2?
- ACF not showing
- Cannot modify header information – headers already sent (wp_redirect in functions.php)
- Javascript function not working when placed in Text Block
- Need help getting a function to function
- Load Post into DIV with Ajax
- Use html inside shortcode function
- How to remove comment count column in Posts inside the admin dashboard?
- Cannot declare function twice [closed]
- Running script based on Category
- Get array of metakey in all posts
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Unable to return values from function
- Function not working inside of a function in functions.php
- How to Use Global Variables Inside Header and Footer
- Redirect website domain (including all pages) to external URL after Popup message (few seconds)
- Where do I go to edit this area? [closed]
- Enable right click on WordPress site
- processing form data with ajax
- Check from functions.php if function exists in footer.php
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- Email Exists ERROR into Ajax registration form
- How to overwrite template.php file
- Limit number of characters in different excerpts
- The work of WordPress Function update_post
- Facebook OpenGraph error, Call to undefined function wp_get_attachment_src()
- How to avoid saving empty data to sql while using add_meta_box
- How to assign php file(template) to several pages with same prefix page name/slug
- How to fix Function create_function() is deprecated in / themes
- Block all plug-ins from initiating redirection upon activation?
- How to display my comment count in the wordpress admin bar?
- How Can I Create a Friendly Slug for a Dynamic Page?
- custom error message for empty username and password using authenticate filter not working
- Modifying a WordPress Plugin
- Last updated posts shortcode in functions.php
- I have an fatal error on my funcyions.php
- Get post_author email for Zapier Integration
- get_locale() is different from $locale
- If click on Save/Publish change Post Status to Pending Review instead Publish
- Remove all video attachment, both files and post/postmeta from database?
- Remove the delete link from pages without a plugin
- save_post doesn’t correctly process function call with php class
- Custom download page
- HowTo: Add wrapper to columns shortcode?
- How to include a hyperlink in the body text of a custom password protected form?
- Get title from IDs in a string
- uninstall a theme programmaticlly
- Could you please correct the code is_admin()
- Dynamically generated Navigation Diagram using Custom Fields
- Update add_image_size
- Function to get the name in database table from the comma separated string
- Full size image option removing problem
- Limit length of headline in Editor
- Add custom fields after post/page title
- Ajax call does not work for this custom code
- Force resize for all video content
- Way of getting queried loop before the query with a filter hook?
- Add the title of a widget as an ID – for anchor links
- Why my wp_enqueue_script doesnt work on some page?
- Need to use an external variable inside a function
- Trying to get this function to show below the content
- Correct php syntax to add an image in wp functions.php
- woocommerce_sort_product_tabs() expects an array