WordPress.org

Forums

[resolved] Help. Retrieving posts data outside of the_loop. (3 posts)

  1. carlok
    Member
    Posted 7 years ago #

    Hello.
    Inside a plugin on a page (not on a post) and having the ID of a given post, what is the simplest way to retrieve its categories/title/authors OUTSIDE of the_loop?
    Thank you.

  2. Jeremy Clarke
    Member
    Posted 7 years ago #

    get_post() looks like it will do the trick:
    http://codex.wordpress.org/Function_Reference/get_post

  3. carlok
    Member
    Posted 7 years ago #

    Thank you very much.
    I suppose that get_categories() would be a good friend of get_posts()
    See
    http://codex.wordpress.org/Function_Reference/get_categories
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags