• I am wondering how to use wp_query() with a post_id. Does anyone know how to do this?

    I have tried a few things that don’t work:

    wp_query('post_id=160');
    wp_query('id=160');
    wp_query('id=160');

    etc. and haven’t been successful.

    Any ideas? Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter Zac Gordon

    (@zgordon)

    Finally!

    The correct format is this:
    wp_query('p=160');

    I don’t think that I ever would have thought of that. If anyone can find this in the documentation, I would love to finally have that page bookmarked…

Viewing 1 replies (of 1 total)
  • The topic ‘Get post ID parameter for wp_query() function’ is closed to new replies.