You have already getting the student ID, Replace the following line of code
echo $student_info->user_id;
With
echo $student->ID;
Here’s a link!
Related Posts:
- Getting all user metadata from user
- How to add custom query filters in WP_User_Query
- Filter user list that meta_value is empty
- Query wp_usermeta alongside wp_users
- SQL User Query by Multiple Roles using PHP
- WP User Query get all authors with last name starting with specific letter
- Sort users by “birthday” using WP_User_Query
- Hide Administrators From User List except current user (administrator)
- How to display user order by role
- Import wp users via one click demo option
- Dynamic User Id
- Prevent author bio page from showing in search results
- Get multiple users with meta value in one query and populate WP_User class
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- Display if author page is author page of current user
- Get user first name from custom endpoint
- Storing an array of objects related to each user
- Create one-use post dynamically, add to main query, do not insert post (user profile view)
- Query to get last posts from authors of blog
- Query pages created by deleted users
- Query posts by post type, author and post meta
- Random users always showing same 8 users
- Set “editor” role to existing user
- How to query 5 users in random who have published more than 10 posts
- How to query users by post count no less than 10
- Merge wp-query and get_users
- Get all wp_users sort by metakey
- Logging search queries for logged-in users
- List users by Year of Birth using a foreach loop to dynamically populate years and data
- Query Users by post count, last 30 days and display each users post count according to post type
- Get users query makes the site loading time too big?
- Get all user with both meta_value
- WP Query Args – Title or Meta Value
- WordPress Pagination Not Working – Always Showing First Pages Content
- Whats the difference between post_limits and pre_get_posts?
- Query WooCommerce orders where meta data does not exist
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- What exactly does the ‘s’ parameter search for in WP queries?
- get_posts not finding argument: post_name
- get query’s query string
- Show only oldest post by author
- Revolution Slider Orderby Two Custom Fields
- Calling a custom excerpt function in a local loop
- Get random terms
- Dynamically Override Fancy Title – Part II
- How to run query inside a class with namespace?
- Modify existing query and change order of posts
- Why does the_content not work like others for a set post id?
- Rewrite rule to prettify two $_GET variables while in a new endpoint from a page
- Creating a custom search for a specific post type
- How to add post_distinct filter to WP_Comment_Query?
- WP_Query Group by Author and Order each group DESC
- List only posts from specific category on category page
- WP_Query ignoring tax_query when is_singular
- WP_Query() order by post content lenght?
- Excluding pages in WP_query using ACF
- reset to main loop doesnt work
- Pagination on static Posts page
- WP_Query : Search and Filter Using custom field AND/OR custom taxonomy
- Query all posts if multiple meta key don’t exist
- WP_Query with rewind_posts creates duplicate titles
- Check for the main query from the template
- How do I turn these values from MYSQL into an array
- Use Ajax To filter posts?
- Get user posts with custom WP_Query on author.php
- Getting the post terms ‘wp_get_post_terms’ per post when within the functions.php file
- Posts Query | Query to only show sub categories
- WP Query and date format
- How to Order By Two Custom Fields?
- Display specific page (that is child) content on parent page
- WP_query problem -spurious results
- Avoid duplicate while merging two query post
- ajax wp_query conditional tags not working
- Comparing 2 Decimal Numbers from custom fields and displaying posts
- max_num_pages says 4, yet I am only able to navigate to the third page
- Execute PHP function inside the admin area
- paginate_links appearing on page but it doesn’t actually paginate – pagination on a static page with a dynamic `post_type` argument on a static page
- Form checkbox value going to dynamic URL
- show most viewed post
- I need query_posts() to order results first by a meta value and then by post ID
- Pre_get_posts only show posts by administrator roles
- Custom category page with taxonomy filters
- WP Query – Search in title or author_name
- WP Query for Multiple Post Types
- URL to Post Archive of Custom Query
- How do i query woocommerce booking post type on init action?
- WP_Query doesn’t return some child pages even though the database shows them
- Empty ‘terms’ in ‘tax_query’ returns an empty array
- Get newest value of an array
- Return a single custom post from multiple meta queries
- ordering and optimizing functions
- Why does order ASC break offset in WP_Query?
- new WP_query using custom fields
- Having Trouble Running Query From Shortcode Using Tribe’s Events Plugin
- Dynamically create array from page title
- Ordering Custom WP_Query loop by meta key value with pagination
- wp_pagenavi on WP_Query using customfields
- paginate_links() on page (shortcode output)
- WordPress Query Returning Every Post
- shortcode with $atts with strange results