• Googling gives me a lot of results for getting the author PAGE url by ID and the like.

    What I have us a URL. From that URL, I need to know who wrote the post.

    What’s the easiest way to do this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The URL won’t tell you that. What is the scenario you’re working with?

    Thread Starter robin_dean

    (@robin_dean)

    I’m looking to determine author-specific affiliate profits. These are confirmed payments, not ad clicks. I’m using the SkimLinks reporting API and the *only* info it provides (that I can coordinate with WordPress) is the URL.

    I’m looking for the most efficient way to get the author based on the url. I explored “get_posts” but backtracked when some of my code became jumbled (too much time in front of the monitor).

    This thread is my “fresh eyes tomorrow” hail Mary from yesterday ??

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So what is one of these URLs? does it have an author name in it? If not, you’ll have to take that URL, look it up on your site, and get the author.

    Thread Starter robin_dean

    (@robin_dean)

    The author isn’t included in the url and I’m one step ahead of ya’ on having to jump through a few processing hoops with the database, etc. My hope is to learn the most efficient way to get to the author name using said hoops. Here’s an example URL:

    https://www.theridingobsession.com/motorcycle/touring/riding-maps/united-states/long-distance/better-lake-michigan-circle-tour/

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    if you want to do this externally, you should look into the WordPress REST API

    Use APIs rather than going directly to the DB.

    Thread Starter robin_dean

    (@robin_dean)

    I appreciate your effort thus far but I prefer to keep my installation as free of plugins as possible. I won’t be using this page on a site-wide basis, only visiting it on my own (noindex, nofollow, noarchive, admin only), so a single call for something like “get_posts” won’t be too demanding for the server.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Get Author From URL?’ is closed to new replies.