Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get post id from permalink (pretty url)?

How to get post id from permalink (pretty url)?

like image 421
Jeaf Gilbert Avatar asked Nov 02 '10 05:11

Jeaf Gilbert


1 Answers

You should be fine with url_to_postid()[see documentation] which is located in rewrite.php. I used it in a plugin of mine last year, works like a charm.

like image 52
kovshenin Avatar answered Sep 29 '22 21:09

kovshenin