$b = get_post( $a);
// post_author already contain author ID.
//So you can assign author's ID to $c same as to $d
$c = $d = $b->post_author;
Related Posts:
- Get page ID of page that is set as the posts page
- Are post ID’s reliable?
- Get current post id in functions.php
- Hook that get’s triggered when the author of a post is changed
- the_author() returns empty string
- Prevent Authors from viewing each others Posts
- get all posts ID from a category
- Display Random Author with Details in Sidebar
- How to show list of posts by author and category?
- Get the current post ID as a variable in Javascript
- WordPress: How to get the current logged in author page URL?
- Is post ID number always incremental n+
- How to add editor’s name to entry meta byline?
- Different permalink for posts and authors
- How to display posts by current user/author in a custom page template?
- Query posts distinct authors
- Restrict the Number of Posts an Author can Publish (over time)?
- Search posts by post author name
- Get the user type of an author
- Are all ID’s used unique?
- Show the title of the latest post by author
- $post->ID displays wrong ID
- Find most recent authors
- Show author post count in sidebar – Variable
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Get current users post URL?
- Get the author of the latest revision
- Filter posts by author and category simultaneously
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Post author is changed to admin after his post is modified by admin
- Showing random content / pictures from earlier posts in a sticky post?
- Get the post_id of a new post
- Get all posts by post_author
- get post id in while loops outputting page id
- How can I display a specific user’s first published post?
- Undefined variable post_id in custom quick edit coloumn
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- Limit number of posts a user can make per minute?
- Authors in menu, template list post by author
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Author must complete profile info before they can publish a post?
- WP rest api returns 404 only when author param is used
- How can I list random authors from current post category?
- Getting post id from wp_insert_post_data function?
- Does an article (post) id ever change?
- How to get the post’s parent ID?
- Can a page_id and a post_id be same?
- Is there a better, more efficient way to get the post id outside the loop?
- Getting current post ID in functions.php
- Buddypress activity id
- How can I show wordpress posts based on author?
- Show info to author only
- Auto “expire” all of an authors posts on spcific date
- How blog page in WordPress works : blog page retrieve first post ID
- How to get the user meta data for a post?
- Limit posts per author role (excluding admin) in home page
- Guest Author – How to display posts on /author/ archive page
- How can I show many posts an author has per week?
- Post-ID in url differs from $post->ID
- How to give capability (publish contributors posts) to author role?
- Why is my Blog Page ID == First Post ID?
- current post with current author
- Whitelist Author of Private Post
- Is it possible to change post id for an already added menu item in WordPress?
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- Show posts by a custom post author
- How to get next post ID?
- How do I apply a wordpress function to something with no ID inside an archive page?
- Get from the dashboard the ID of the current post being edited
- Custom author search
- Only get post_id [duplicate]
- Changing the Category for all posts of an Author
- Surrogate ID for posts, is there an alternative field in the posts table?
- List of authors posts minus very latest
- Is it possible to have dynamic post id # in add_menu_page()?
- show latest authors blog post
- Getting posts from multiple users?
- Using Post ID and Page ID in same function
- Display the current post author and his url in the post header
- Create a Page Template Which Displays All Posts by Current User
- Set the limit to allow author when make post!
- unused post IDs
- Show last post of employee in his profile page
- How to get single post by one author?
- Notify Author of the post if admin deletes his post and perform some function
- how to show all type of author posts in author page (SOLVED)
- Custom post page has attributes of latest post [closed]
- Echo author slug in post edit page
- How to show total view count across all posts for an author
- How can I add Author’s phone number to wp profile and make it appear in wp-admin/edit.php columns
- Can I get custom post items in select box (dropdown)
- Add author section on Author archive posts
- What is $post->ID
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- View post with specific category id and name which I selected in the backend (drop-down option)
- users followin the blog post author
- How to get post ID after removing that post?
- Why does ‘get_the_ID’ work outside of the loop?