Forum: Nearby Posts

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Nearby Posts premium extension please open a new premium support ticket.

[Resolved]Get Author ID in gmw-nearby-posts-shortcode.php

Forums Nearby Posts Get Author ID in gmw-nearby-posts-shortcode.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #30419
    mattmatt
    Member

    Hello,

    I would like to get the ID of the post creator in the gmw-nearby-posts-shortcode.php, inside the
    “foreach ( $gmw_nbp_posts as $post )”, because I only want to display near posts of authors that have specific settings set.

    In my widgets and theme files I therefore use the code “get_the_author_meta(‘ID’);”. But in the plugin it always echoes the ID of the logged in user instead of the post author, although I thought I’m in the loop.

    Do you know a way to get the ID?

    Thanks a lot

    #30422

    Hi Matt,
    Are you using the beta of the next version? Have I emailed it to you?

    #30421
    mattmatt
    Member

    Got it to work with get_post_field( ‘post_author’, $post[‘ID’] );

    But would be great if you could email me the beta of the next version.

    #30420

    Sorry on the delayed reply Matt.
    I am almost ready to release the beta of the next version of GEO my WP. Once I am done so I will have to make few adjustments in the new version of Nearby Posts so it will be compatible with the new version of GEO my WP. When the beat of Nearby Posts is ready I will email it to you.

    It should be some day this week.

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

You must be logged in to reply to this topic.