$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?
- Hook that get’s triggered when the author of a post is changed
- get all posts ID from a category
- Display Random Author with Details in Sidebar
- Get the current post ID as a variable in Javascript
- WordPress: How to get the current logged in author page URL?
- How to add editor’s name to entry meta byline?
- Query posts distinct authors
- Get the user type of an author
- Show the title of the latest post by author
- $post->ID displays wrong ID
- At my posts archive page, outside the loop, get_the_id() returns the top most post’s ID
- Get current users post URL?
- Filter posts by author and category simultaneously
- 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
- How can I display a specific user’s first published post?
- How can I control multiple editing of wordpress posts?
- Authors in menu, template list post by author
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- WP rest api returns 404 only when author param is used
- How can I list random authors from current post category?
- Can a page_id and a post_id be same?
- Buddypress activity id
- Show info to author only
- Limit posts per author role (excluding admin) in home page
- Guest Author – How to display posts on /author/ archive page
- Post-ID in url differs from $post->ID
- Why is my Blog Page ID == First Post ID?
- 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
- Search results posts_orderby and ID
- Getting the current author (it has changed) of a post, not the original author
- Showing author page if user has no post
- Retrieve post ID from “querying” URL
- Display Notification Bar on Header on Certain Post Count
- How to get a post’s content? [closed]
- How do I retrieve a users’ last 5 posts?
- How to get ID of the page included with get_page()?
- Get all comments of author’s posts
- static landing page leading to author specific pages w/ “live” content
- All Posts Linking to Author Posts directly
- retrieve the oldest post id
- How to get the ability to change the author of a post
- Echo Text If User Is Logged in But NOT the Author of post
- Only allow posts with a specific term to only be viewed by other authors with the same term in their post
- How to limit author related post listing ?
- Get total post from an author
- Send email to author of post on post submission
- WP_Query custom field pass the post id
- How do post IDs work in WordPress?
- Exclude a category of posts in author template
- The loop starting at a certain ID
- Get latest author posts inside the loop
- Widget to show posts in the sidebar basing on its IDs
- Display message depending on capability outside loop
- How do I disable the “by author” hyperlink on posts?
- Making posts permalinks consistent numbers
- Authors’ Links on Homepage Not Going to Author Post Pages
- Send email to admin with post author
- adding my posts (author posts) in menu
- how to show comments only author which send own posts in wordpress
- Restricting displayed posts to posts from only select authors
- WordPress Post ids big increment
- Change of author not updating
- Limit Post Creation Count by Author or Role
- Reuse old post ID for new post after deleting post
- Get post attachment with post id
- On WordPress Search, how to search post from Author meta also
- How to hide meta from search result only on pages?
- How can i take all ids from untrash_post action?
- Numbering author posts in posts query
- 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
- 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
- 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)
- 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
- Add author section on Author archive posts
- What is $post->ID
- 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?