Get Author ID of Post

This topic contains 3 replies, has 3 voices, and was last updated by  Paolo 8 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #65415

    Myeo
    Expired Member
    Post count: 44

    Hi Mod,

    We need to retrieve the AuthorID of the current post. Please advise how can we get the info?

    Thanks!

    #65430

    Guust
    Moderator
    Post count: 29970

    Go to the list of your users and hover over the name of the user, then have a look at the status bar. Or click on “edit” and look at the URL.

    #65481

    Myeo
    Expired Member
    Post count: 44

    Sorry we didn’t put it clearly.

    We’re using the Formidable Form x GD Tabs (https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/) and we wish to retrieve the AuthorID based on the post ID.

    We saw there’s a function to retrieve the email > geodir_get_post_meta($post_id, ‘geodir_email’);

    Anyway to retrieve the AuthorID?

    #65530

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    try this:

    $author_id=$post->post_author;

    It should work like in normal posts…

    Let us know if this helped,

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket