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
- Group users by meta field, with name of meta field as group title
- WP_Query with “post_title LIKE ‘something%'”?
- How to extend WP_Query to include custom table in query?
- WP_Query orderby date not working
- Best way to detect if you are in a SINGLE POST page
- compare meta_query in get_posts arguments
- How to do a wp_query using “BETWEEN” with two meta_values?
- Better way to get tag stats?
- Query two taxonomies via URL or link?
- How do I order pages and categories by ID or name in the same query?
- wp_query order by title
- How to do a query only on a specific admin page?
- WP Cron and wp_insert_post
- Sort posts by custom taxonomy name
- How to adjust found_posts so that it accounts for offset and pagination
- SQL query equivalent to WP User Query
- Function to check if author has posted within the last x days
- Wp_query order by multiple custom fields?
- Would this post meta be better added to the post table rather than post_meta table
- Show default content if custom WP_Query has no posts
- WP Query for Posts (Products) in Specific Category that has 2 Specific Tags (*AND* both tags not *OR*)
- meta_query on a date range using an array of values
- Pagination for custom query on single.php
- Get product list of given category
- Remove ellipsis from the excerpt retrieved using get_the_excerpt()
- How to exclude products by tag from woocommerce shop page?
- Filtering posts by custom field value not working
- wpdb get results doesn’t work with variable
- Query Ignoring ‘exclude’ Parameter?
- Custom pagination with WP_Query generating 404 error
- WordPress query vars are not added
- When querying a combination of posts and other meta fields, is there a better solution than directly modifying the WHERE value?
- Query post with meta_query where date is not in future
- Apply CSS class to every second database record [closed]
- How to prevent writing duplicate loops?
- merge two query arguments into one WP_Query call
- Adding a parameter to the default query
- Using WP_Query in “parse_query” or “pre_get_post” in Posts2Posts
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Alternative to query->set that appends conditions instead of overriding
- Group WP_Query by meta_key date
- Set if condition with wp_nav_menu
- How do I change the order (ASC and DESC) in the following retrieval method using WP_Query?
- While creating Block Themes in WordPress, how can I query custom posts for an Archive view?
- How To Fix WP Query Returns Results But Shouldn’t?
- why update and delete query not worked in custom table?
- get_users is missing or skipping over users in loop
- WP_Query sorted by custom taxonomy
- Weird orderby => post__in issue
- how to handle multiple ajax wordpress queries?
- problem by deleting new plugin installed inside the WordPress after any heroku app sleeping [closed]
- Use posts_groupby filter with part of string in wp_query?
- How to extract specific post
- Adding multiple meta_key fields as orderby options to a WP Query via a function
- 1/3 of posts different class
- wp_Qwery works to slow
- Search for “2nd” also returns “22nd” in wp_query
- How to query custom post types with mixed AND & OR statements for custom fields
- Custom post type archive pagination query issue
- 2 weeks ago from meta query meta value
- 1500+ duplicate queries via get_option function (query monitor)
- Add custom argument to WP_Query and modify SQL where clause
- How does Show Posts based on a keyword search work in WP_Query
- Pagenavi with archive page
- WordPress Ajax search filter on dropdown select
- after refresh the id that shows correct in first time click, changes to 1
- WP_Query on custom taxonomy -> Location and Activity
- How to display only posts from the last day with posts published?