Support » Plugins » get_post_by_path?

  • Hello! I’m new to WordPress but got a lot of experience in programming of php. I’m wirting a plugin right now, which developed easy and straight forward so far.

    But now I came over an odd thing: I needed to get a category from an URL, so I used get_category_by_path. Fine

    But what do you do if you got a URL from a post and you need the post-id? I’m missing a method get_post_by_path.

    The only way I found out I could find a post by an URL is to query the database – but why should there be a method for the categories but not for posts? Can you help me please? Thanks a lot!

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