• Hi, I need to return the author_ID into the php code, not echo it. Is there a simple way to do this, as I can only get an echo with the *php the_author_ID();* tag.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try get_author_ID. There’s get_ versions of most of the functions.

    If that’s not a valid function, just do $post->author_ID or whatever the column name is.

    this should work:

    $author_id = $post->post_author;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Return Author ID?’ is closed to new replies.