The {gwp_post_id} merge tag returns the post-id for a certain url.


  • url – The URL of the post for which the ID is to be retrieved. This parameter is required.

Example Usage

{gwp_post_id url="/some-post/"}

This will output the ID of the post located at “”. If the post ID cannot be found, an error message will be displayed.

Advanced Merge Tagsv1.4

To use the functionalities described in this documentation, you'll need to get the GravityWP - Advanced Merge Tags add-on.

Read more