{"id":62805,"date":"2023-02-14T15:30:00","date_gmt":"2023-02-14T13:30:00","guid":{"rendered":"https:\/\/themeisle.com\/blog\/?p=62805"},"modified":"2023-08-17T17:35:50","modified_gmt":"2023-08-17T14:35:50","slug":"get-post-id-wordpress","status":"publish","type":"post","link":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/","title":{"rendered":"How to Get Post ID in WordPress"},"content":{"rendered":"\n<p>When you create a post or page in WordPress, the platform automatically assigns it an ID number or unique identifier. There are many scenarios in which you might want to get this WordPress post ID; for instance, if you need to exclude particular articles from a content grid or want to code a custom query.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Unfortunately, WordPress does not share the post ID openly, so you will need to follow a few steps to locate it. \ud83d\ude0e<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>In this article, we will explain everything you need to know about <a href=\"#how-to-find\">how to find a post ID in WordPress<\/a> &#8211; from a simple solution that only requires you to use your mouse to more advanced techniques to display IDs in columns and new dashboards. So, let&#8217;s jump right in!<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n\t\t<div class='ti-tweet-clear'><\/div>\n\t\t\t<div class='ti-tweet_wrapper'>\n\t\t    \t<div class='ti-tweet_text'>\n\t\t    \t\t<a href='https:\/\/twitter.com\/share?text=How+to+find+%F0%9F%94%8D+a+%23post+ID+in+%23WordPress&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/' target='_blank' rel='nofollow'>How to find \ud83d\udd0d a #post ID in #WordPress<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class='ti-tweet_sharebtn'>\n\t\t    \t<a href='https:\/\/twitter.com\/share?text=How+to+find+%F0%9F%94%8D+a+%23post+ID+in+%23WordPress&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/' target='_blank' rel='nofollow'>Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n<\/div>\n<\/div>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What is post ID and why do you need It?<\/h2>\n\n\n\n<p>As we mentioned, post and page IDs are unique identifiers that WordPress uses to recognize specific content. For example, a plugin might need to know these details to include or exclude certain articles from a particular function. If you are a developer, you might also use these IDs to add custom code to your WordPress website or build shortcodes (most of them use post and page IDs as parameters, so it&#8217;s important to know them).<\/p>\n\n\n\n<p>For example, if you want to target a specific page to change how your site looks and functions, you might write something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>if(is_single(POST_ID))<\/em>\n{\n\t\/\/...\n}<\/code><\/pre>\n\n\n\n<p>In this case, <em>POST_ID<\/em> is the unique identifier for the content you want to locate and use. Now, you would think finding this information would be easy, considering millions of people use (and adapt!) their WordPress theme on a daily basis. The truth is, finding post IDs is indeed relatively straightforward &#8211; but only if you know where to look!<\/p>\n\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-find\">Best ways to get WordPress post IDs<\/h2>\n\n\n\n<p>There are five main approaches you can use to view post IDs. Let&#8217;s go through each of them in a little more detail and see which is best for each case.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#option-1\">Option 1: Use the WordPress dashboard or URL<\/a><\/li>\n\n\n\n<li><a href=\"#option-2\">Option 2: Show your post IDs in the posts tab<\/a><\/li>\n\n\n\n<li><a href=\"#option-3\">Option 3: Get your IDs using a PHP function<\/a><\/li>\n\n\n\n<li><a href=\"#option-4\">Option 4: Use a plugin to display post IDs<\/a><\/li>\n\n\n\n<li><a href=\"#option-5\">Option 5: Locate your post data in the WordPress database<\/a><\/li>\n<\/ul>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-1\">Option 1: Use the WordPress dashboard or URL<\/h3>\n\n\n\n<p>Using your WordPress dahboard is the easiest and quickest way to identify WordPress post IDs. To do this, just go to your menu options and click on <em><strong>Posts<\/strong><\/em>. This will show a list of posts on the right-hand side of your page.<\/p>\n\n\n\n<p>To get their IDs, all you need to do is hover your mouse over the title. You will see the number at the bottom of your browser window:<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1184713161  fetchpriority=\"high\" decoding=\"async\" width=\"1108\" height=\"669\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg\" alt=\"Finding a post ID from the WordPress dashboard\" class=\"wp-image-62808\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1108\/h:669\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 1108w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:181\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:618\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:464\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:30\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:658\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 658w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:994\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 994w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:245\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 245w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:323\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 323w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:224\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 224w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1108\/h:669\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/get-post-id-WordPress-through-wp-admin.jpg 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<p>If you have trouble seeing the ID this way, you can also click on the post to open it. This will take you to the Editor. The URL will also show the ID (62805 in the example below) in the navigation bar at the top of your web browser!<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1575183093  fetchpriority=\"high\" decoding=\"async\" width=\"240\" height=\"40\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/02\/Locating-a-post-ID-from-the-browser-address-bar.png\" alt=\"Locating a post ID from the browser address bar\" class=\"wp-image-63501\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:40\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/02\/Locating-a-post-ID-from-the-browser-address-bar.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:8\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/02\/Locating-a-post-ID-from-the-browser-address-bar.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:40\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/02\/Locating-a-post-ID-from-the-browser-address-bar.png 2x\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><\/figure><\/div>\n\n\n<p>One important thing to keep in mind is that the post address bar will show a different format when you edit an article compared to what your users see when they visit your site. This is because WordPress allows you to pick your own permalink structure, which means your address might not show IDs at all to your visitors. In fact, if you <a href=\"https:\/\/themeisle.com\/blog\/permalinks-in-wordpress\/\">set up your permalinks<\/a> correctly, it should <strong>not<\/strong> and will <strong>not<\/strong> publicly show the ID at all.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-2\">Option 2: Show your post IDs in the posts tab<\/h3>\n\n\n\n<p>This method is a little more advanced, but if you use IDs a lot, it&#8217;s worth considering. You can display post IDs directly on your Posts tab; all you need to do is <a href=\"https:\/\/themeisle.com\/blog\/wordpress-functions-php-guide\/\">edit the <em>functions.php<\/em> file<\/a> to add a column title containing it.<\/p>\n\n\n\n<p>The way you do this is by locating this file (which is usually under your <em>wp-content\/themes<\/em> folder) and adding the following code to it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>function add_column( $columns ){<\/em>\n\t<em>$columns&#091;'post_id_clmn'] = 'ID';<\/em>\n\t<em>return $columns;<\/em>\n<em>}<\/em>\n<em>add_filter('manage_posts_columns', 'add_column', 4);<\/em>\n\n<em>function column_content( $column, $id ){<\/em>\n\t<em>if( $column === 'post_id_clmn')<\/em>\n\t\t <em>echo $id;<\/em>\n<em>}<\/em>\n<em>add_action('manage_posts_custom_column', 'column_content', 4, 2);<\/em><\/code><\/pre>\n\n\n\n<p>What this snippet will do is add a new ID column. Because the example above uses the &#8220;4&#8221; column, the ID will be shown in the 4th position starting from your left. You can, of course, adjust this code as you prefer.<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=1805448010  fetchpriority=\"high\" decoding=\"async\" width=\"1501\" height=\"650\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png\" alt=\"post IDs in wp-admin\" class=\"wp-image-62810\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1501\/h:650\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 1501w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:130\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:443\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:333\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:22\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:208\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:344\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1200\/h:520\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:128\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:169\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:117\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1501\/h:650\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-wp-admin.png 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-3\">Option 3: Get your IDs using a PHP function<\/h3>\n\n\n\n<p>For developers, another easy way to fetch post IDs is to use actual PHP functions that have been built into WordPress from the start. These functions let you reference post IDs directly and do so in different places throughout your own custom code.<\/p>\n\n\n\n<p>The function is actually quite straightforward:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>get_the_id();<\/em><\/code><\/pre>\n\n\n\n<p>Of course, you can also find post ID numbers using the post slugs or post title, or even the post&#8217;s URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>$mypost = get_page_by_path('post-slug', '', 'post');<\/em>\n<em>$mypost-&gt;ID;<\/em><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><em>$mypost = get_page_by_title( 'The title of your post', '', 'post' );<\/em>\n<em>$mypost-&gt;ID;<\/em><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><em>$mypost_id = url_to_postid( 'https:\/\/YOURWORDPRESSSITE.com\/unique-post' );<\/em><\/code><\/pre>\n\n\n\n<p>Lastly, you can fetch IDs in a <a href=\"https:\/\/themeisle.com\/blog\/wordpress-loop\/\">WordPress loop<\/a>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>$id_query = new WP_Query( 'posts_per_page=6 );<\/em>\n\n<em>while( $id_query-have_posts() ) : $id_query-&gt;the_post();<\/em>\n\t<em>$id_query-&gt;post-&gt;ID;<\/em>\n<em>endwhile;<\/em><\/code><\/pre>\n\n\n\n<p>Although finding IDs this way can come in handy when you&#8217;re writing custom code, if all you need to do is get the number for just a few pages or posts, the other methods will work better.<\/p>\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-4\">Option 4: Use a plugin to display post IDs<\/h3>\n\n\n\n<p>If you don&#8217;t want to edit your <em>functions.php<\/em> file, something you can do instead is install a plugin that can display not just your post IDs but also the numbers for your pages, tags, categories, media files, and <a href=\"https:\/\/themeisle.com\/blog\/wordpress-custom-post-types\/\">custom taxonomies and post types<\/a>.<\/p>\n\n\n\n<p>One good option is ShowIDs, a lightweight free plugin that doesn&#8217;t need any configuration. You just activate it, and it will automatically show your IDs on a column present on all admin pages.<\/p>\n\n\n<div class=\"wp-pic-wrapper aligncenter large\" style=\"margin:20px 0;\"><div class=\"wp-pic large plugin wp-pic-ajax scheme2\"  id=\"wp-pic-wpsite-show-ids\"data-type=\"plugin\" data-slug=\"wpsite-show-ids\" data-image=\"\" data-expiration=\"60\"  data-layout=\"large\" data-slugs=\"[]\" ><div class=\"wp-pic-body-loading\"><div class=\"signal\"><\/div><\/div><\/div><\/div><!-- .wp-pic-wrapper--><link rel='stylesheet' id='dashicons-css' href='https:\/\/themeisle.com\/blog\/wp-includes\/css\/dashicons.min.css?ver=6.8.5' type='text\/css' media='all' \/>\n<link rel='stylesheet' id='wppic-style-css' href='https:\/\/themeisle.com\/blog\/wp-content\/plugins\/wp-plugin-info-card\/dist\/wppic-styles.css?ver=6.1.1' type='text\/css' media='all' \/>\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-includes\/js\/jquery\/jquery.min.js?ver=3.7.1\" id=\"jquery-core-js\"><\/script>\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-includes\/js\/jquery\/jquery-migrate.min.js?ver=3.4.1\" id=\"jquery-migrate-js\"><\/script>\n<script type=\"text\/javascript\" id=\"wppic-script-js-extra\">\n\/* <![CDATA[ *\/\nvar wppicAjax = {\"ajaxurl\":\"https:\\\/\\\/themeisle.com\\\/blog\\\/wp-admin\\\/admin-ajax.php\"};\n\/* ]]> *\/\n<\/script>\n<script type=\"text\/javascript\" src=\"https:\/\/themeisle.com\/blog\/wp-content\/plugins\/wp-plugin-info-card\/assets\/js\/wppic-script.min.js?ver=6.1.1\" id=\"wppic-script-js\"><\/script>\n\n\n\n<div class=\"su-divider su-divider-style-default\" style=\"margin:40px 0;border-width:15px;border-color:#4267cf\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-5\">Option 5: Locate your post data in the WordPress database<\/h3>\n\n\n\n<p>If you&#8217;re already familiar with the <a href=\"https:\/\/themeisle.com\/blog\/wordpress-database-optimization-tips\/\">WordPress database<\/a>, you might suspect that the post ID is also stored there. In fact, the database will contain everything related to your content, such as categories, tags, authors, dates, comments, and more.<\/p>\n\n\n\n<p>To locate your post IDs using phpMyAdmin, all you need to do is:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to your hosting control panel (or <a href=\"https:\/\/themeisle.com\/blog\/what-is-cpanel\/\"><em>cPanel<\/em><\/a> &#8211; most hosts use it).<\/li>\n\n\n\n<li>Click on <em><strong>Databases \u2192 phpMyAdmin<\/strong><\/em>.<\/li>\n\n\n\n<li>Choose a database on the left side (most sites will only have one) and click<em> <strong>Enter phpMyAdmin<\/strong><\/em>. Usually, the database that WordPress uses starts with<strong> <code>wp_<\/code><\/strong>.<\/li>\n\n\n\n<li>Find and click on <code><strong>wp_posts<\/strong><\/code>. You will see the post <code>ID<\/code> column in the fourth position.<\/li>\n<\/ul>\n\n\n\n<p>Make sure you don\u2019t change anything on your database unless you are familiar with the interface and understand the information that is stored here.<\/p>\n\n\n<div class=\"wp-block-image blog-img-std\">\n<figure class=\"aligncenter size-full\"><img data-opt-id=168942037  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg\"  decoding=\"async\" width=\"909\" height=\"350\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg\" alt=\"The post ID column within phpMyAdmin\" class=\"wp-image-62811\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:909\/h:350\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 909w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:116\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:296\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:19\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:185\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:306\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:114\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:104\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:909\/h:350\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 2x\" \/><noscript><img data-opt-id=168942037  decoding=\"async\" width=\"909\" height=\"350\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg\" alt=\"The post ID column within phpMyAdmin\" class=\"wp-image-62811\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:909\/h:350\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 909w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:116\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:296\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:19\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:480\/h:185\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 480w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:794\/h:306\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 794w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:296\/h:114\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 296w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:390\/h:150\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 390w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:270\/h:104\/q:mauto\/f:best\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 270w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:909\/h:350\/q:mauto\/f:best\/dpr:2\/https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/post-ids-in-database.jpg 2x\" sizes=\"(max-width: 700px) 100vw, 700px\" \/></noscript><\/figure><\/div>\n\n<div class=\"su-divider su-divider-style-dotted\" style=\"margin:40px 0;border-width:1px;border-color:#999999\"><a href=\"#\" style=\"color:#999999\">Go to top<\/a><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion \ud83e\uddd0<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>As we have seen, finding your WordPress post and page IDs is easy if you know where to look.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n\t\t<div class='ti-tweet-clear'><\/div>\n\t\t\t<div class='ti-tweet_wrapper'>\n\t\t    \t<div class='ti-tweet_text'>\n\t\t    \t\t<a href='https:\/\/twitter.com\/share?text=How+to+find+%F0%9F%94%8D+a+%23post+ID+in+%23WordPress&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/' target='_blank' rel='nofollow'>How to find \ud83d\udd0d a #post ID in #WordPress<\/a>\n\t\t    \t<\/div>\n\t\t    \t<div class='ti-tweet_sharebtn'>\n\t\t    \t<a href='https:\/\/twitter.com\/share?text=How+to+find+%F0%9F%94%8D+a+%23post+ID+in+%23WordPress&via=themeisle&related=themeisle&url=https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/' target='_blank' rel='nofollow'>Click To Tweet \n\t\t    \t\t<span><\/span>\n\t\t    \t<\/a>\n\t\t    <\/div>\n\t\t<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Our recommended technique, if you need to locate a few of these unique identifiers, is to simply use the dashboard. This will be the fastest approach to finding IDs and the most straightforward solution if you want to avoid touching any code or installing any plugins on your site.<\/p>\n\n\n\n<p>However, if you need to use IDs more frequently, you should consider adding an option that can display them in a column. You can do this by editing your <strong><em>functions.php<\/em><\/strong> file or by using a plugin (there are free ones that can do it for you). If you are a more advanced user, though, you can take advantage of your database to showcase this and more post information.<\/p>\n\n\n<style>.ticss-d144f107 strong{font-weight: 700;\n    letter-spacing: -0.2px;\n    line-height: 1.2;\n    display: inline-block;}<\/style>\n\n\n<div class=\"wp-block-columns speed-guide has-white-color has-text-color has-background has-link-color wp-elements-2f81f6c5526477b5b4d52d1ca4513949 is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\" style=\"background-color:#4267cf\">\n<div class=\"wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:40%\">\n<figure class=\"wp-block-image size-medium\"><img data-opt-id=30701221  data-opt-src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\"  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:eco\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" old-srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\" \/><noscript><img data-opt-id=30701221  decoding=\"async\" width=\"300\" height=\"300\" src=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png\" alt=\"speed guide\" class=\"wp-image-113040\" srcset=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:300\/h:300\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 300w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1024\/h:1024\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1024w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:150\/h:150\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 150w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:768\/h:768\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 768w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:50\/h:50\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 50w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:240\/h:240\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 240w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:397\/h:397\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 397w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:600\/h:600\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 600w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:148\/h:148\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 148w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:195\/h:195\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 195w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:135\/h:135\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 135w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 1200w, https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:1080\/h:1080\/q:mauto\/f:best\/dpr:2\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2025\/09\/e2ce20299a807336c68c2e029640adaa1.png 2x\" sizes=\"(max-width: 300px) 100vw, 300px\" \/></noscript><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-center ticss-58e79f2f\" style=\"font-size:14px\"><strong>FREE GUIDE<\/strong><\/p>\n\n\n\n<p class=\"ticss-d144f107\" style=\"font-size:25px\"><strong>4 Essential Steps to Speed Up Your&nbsp;WordPress Website<\/strong><\/p>\n\n\n\n<p class=\"ticss-3b627beb\">Follow the simple steps in our 4-part mini series and reduce your loading times by 50-80%.&nbsp;\ud83d\ude80<\/p>\n\n\n<p><div class=\"frm_forms  with_frm_style frm_style_themeisle\" id=\"frm_form_4_container\" data-token=\"ed89d1405a05ea713ad47de5f4a52734\">\n<form enctype=\"multipart\/form-data\" method=\"post\" class=\"frm-show-form  frm_pro_form \" id=\"form_site-speed-guide-below-post\" data-token=\"ed89d1405a05ea713ad47de5f4a52734\">\n<div class=\"frm_form_fields \">\n<fieldset>\n<legend class=\"frm_screen_reader\">Site Speed Guide - Below Post<\/legend>\r\n\r\n<div class=\"frm_fields_container\">\n<input type=\"hidden\" name=\"frm_action\" value=\"create\" \/>\n<input type=\"hidden\" name=\"form_id\" value=\"4\" \/>\n<input type=\"hidden\" name=\"frm_hide_fields_4\" id=\"frm_hide_fields_4\" value=\"\" \/>\n<input type=\"hidden\" name=\"form_key\" value=\"site-speed-guide-below-post\" \/>\n<input type=\"hidden\" name=\"item_meta[0]\" value=\"\" \/>\n<input type=\"hidden\" id=\"frm_submit_entry_4\" name=\"frm_submit_entry_4\" value=\"fb7cdf5c85\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/62805\" \/><input type=\"hidden\" name=\"item_meta[18]\" id=\"field_6px6q2\" value=\"\/blog\/wp-json\/wp\/v2\/posts\/62805\"  data-frmval=\"\/blog\/wp-json\/wp\/v2\/posts\/62805\"   \/>\n<div id=\"frm_field_15_container\" class=\"frm_form_field form-field  frm_required_field frm_none_container\">\r\n\t<label for=\"field_6px6q\" id=\"field_6px6q_label\" class=\"frm_primary_label\">Your Email\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\">*<\/span>\r\n\t<\/label>\r\n\t<input type=\"email\" id=\"field_6px6q\" name=\"item_meta[15]\" value=\"\"  autocomplete=\"email\"  placeholder=\"your@email.com\" data-reqmsg=\"Your Email cannot be blank.\" aria-required=\"true\" data-invmsg=\"Your Email is invalid\" aria-invalid=\"false\"  \/>\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_17_container\" class=\"frm_form_field form-field  frm_none_container vertical_radio\">\r\n\t<div  id=\"field_6px6q3_label\" class=\"frm_primary_label\">Subscribe to our newsletter\r\n\t\t<span class=\"frm_required\" aria-hidden=\"true\"><\/span>\r\n\t<\/div>\r\n\t<div class=\"frm_opt_container\" aria-labelledby=\"field_6px6q3_label\" role=\"group\">\t\t<div class=\"frm_checkbox\" id=\"frm_checkbox_17-0\">\t\t\t<label  for=\"field_6px6q3-0\">\n\t\t\t<input type=\"checkbox\" name=\"item_meta[17][]\" id=\"field_6px6q3-0\" value=\"true\"  data-invmsg=\"Subscribe to our newsletter is invalid\" aria-invalid=\"false\"   \/> Subscribe to our newsletter<\/label><\/div>\n<\/div>\r\n\t\r\n\t\r\n<\/div>\n<div id=\"frm_field_14_container\" class=\"frm_form_field form-field \">\r\n\t<div class=\"frm_submit frm_flex\">\r\n<button class=\"frm_button_submit frm_final_submit\" type=\"submit\"   formnovalidate=\"formnovalidate\">FREE ACCESS<\/button>\r\n\r\n\r\n\r\n<\/div>\r\n<\/div>\n\t<input type=\"hidden\" name=\"item_key\" value=\"\" \/>\n\t\t\t<div id=\"frm_field_24_container\">\n\t\t\t<label for=\"field_lszuy\" >\n\t\t\t\tIf you are human, leave this field blank.\t\t\t<\/label>\n\t\t\t<input  id=\"field_lszuy\" type=\"text\" class=\"frm_form_field form-field frm_verify\" name=\"item_meta[24]\" value=\"\"  \/>\n\t\t<\/div>\n\t\t<input name=\"frm_state\" type=\"hidden\" value=\"tGKtIG19U6wyYcew8uBttUZzl2heyeCp43zFHNCCDf4wF9M0QAXa6pd1+Qu8+H8p\" \/><\/div>\n<\/fieldset>\n<\/div>\n\n<p style=\"display: none !important;\" class=\"akismet-fields-container\" data-prefix=\"ak_\"><label>&#916;<textarea name=\"ak_hp_textarea\" cols=\"45\" rows=\"8\" maxlength=\"100\"><\/textarea><\/label><input type=\"hidden\" id=\"ak_js_1\" name=\"ak_js\" value=\"23\"\/><script>document.getElementById( \"ak_js_1\" ).setAttribute( \"value\", ( new Date() ).getTime() );<\/script><\/p><\/form>\n<\/div>\n<\/p>\n<\/div>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"When you create a post or page in WordPress, the platform automatically assigns it an ID number or unique identifier. There are many scenarios in which you might want to get this WordPress post ID; for instance, if you need to exclude particular articles from a content grid or want to code a custom query. In this article, we will explain everything you need to know about how to find a post ID in WordPress.","protected":false},"author":74,"featured_media":62389,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_stopmodifiedupdate":false,"_modified_date":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[26,272],"tags":[],"hashtags":[],"class_list":["post-62805","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-wordpress-tutorials"],"wppr_data":{"cwp_meta_box_check":"No"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.8 (Yoast SEO v26.1.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Get Post ID in WordPress<\/title>\n<meta name=\"description\" content=\"In this tutorial, we&#039;ll show you how to get post ID in WordPress - whether for a post or a page. We&#039;ll share a few methods for all use cases.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get Post ID in WordPress\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we&#039;ll show you how to get post ID in WordPress - whether for a post or a page. We&#039;ll share a few methods for all use cases.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Themeisle Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-14T13:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-17T14:35:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2180\" \/>\n\t<meta property=\"og:image:height\" content=\"1090\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yisela Alvarez Trentini\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yisela Alvarez Trentini\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\"},\"author\":{\"name\":\"Yisela Alvarez Trentini\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/bfcf13d809aa7475daa80492363e6117\"},\"headline\":\"How to Get Post ID in WordPress\",\"datePublished\":\"2023-02-14T13:30:00+00:00\",\"dateModified\":\"2023-08-17T14:35:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\"},\"wordCount\":1304,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png\",\"articleSection\":[\"WordPress\",\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\",\"url\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\",\"name\":\"How to Get Post ID in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png\",\"datePublished\":\"2023-02-14T13:30:00+00:00\",\"dateModified\":\"2023-08-17T14:35:50+00:00\",\"description\":\"In this tutorial, we\\\\'ll show you how to get post ID in WordPress - whether for a post or a page. We\\\\'ll share a few methods for all use cases.\",\"breadcrumb\":{\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png\",\"width\":2180,\"height\":1090,\"caption\":\"Get Post ID WordPress\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/themeisle.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get Post ID in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/themeisle.com\/blog\/#website\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"name\":\"Themeisle Blog\",\"description\":\"WordPress Tutorials and Reviews for Beginners and Advanced\",\"publisher\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/themeisle.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/themeisle.com\/blog\/#organization\",\"name\":\"VertiStudio\",\"alternateName\":\"Vertigo Studio SA\",\"url\":\"https:\/\/themeisle.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"contentUrl\":\"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png\",\"width\":718,\"height\":156,\"caption\":\"VertiStudio\"},\"image\":{\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/themeisle.com\/blog\/#\/schema\/person\/bfcf13d809aa7475daa80492363e6117\",\"name\":\"Yisela Alvarez Trentini\",\"url\":\"https:\/\/themeisle.com\/blog\/author\/yisela\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Get Post ID in WordPress","description":"In this tutorial, we&#039;ll show you how to get post ID in WordPress - whether for a post or a page. We&#039;ll share a few methods for all use cases.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/","og_locale":"en_US","og_type":"article","og_title":"How to Get Post ID in WordPress","og_description":"In this tutorial, we&#039;ll show you how to get post ID in WordPress - whether for a post or a page. We&#039;ll share a few methods for all use cases.","og_url":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/","og_site_name":"Themeisle Blog","article_published_time":"2023-02-14T13:30:00+00:00","article_modified_time":"2023-08-17T14:35:50+00:00","og_image":[{"width":2180,"height":1090,"url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png","type":"image\/png"}],"author":"Yisela Alvarez Trentini","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yisela Alvarez Trentini","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#article","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/"},"author":{"name":"Yisela Alvarez Trentini","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/bfcf13d809aa7475daa80492363e6117"},"headline":"How to Get Post ID in WordPress","datePublished":"2023-02-14T13:30:00+00:00","dateModified":"2023-08-17T14:35:50+00:00","mainEntityOfPage":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/"},"wordCount":1304,"commentCount":0,"publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"image":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png","articleSection":["WordPress","WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/","url":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/","name":"How to Get Post ID in WordPress","isPartOf":{"@id":"https:\/\/themeisle.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png","datePublished":"2023-02-14T13:30:00+00:00","dateModified":"2023-08-17T14:35:50+00:00","description":"In this tutorial, we\\'ll show you how to get post ID in WordPress - whether for a post or a page. We\\'ll share a few methods for all use cases.","breadcrumb":{"@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#primaryimage","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2023\/01\/Post-ID-WordPress.png","width":2180,"height":1090,"caption":"Get Post ID WordPress"},{"@type":"BreadcrumbList","@id":"https:\/\/themeisle.com\/blog\/get-post-id-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/themeisle.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Get Post ID in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/themeisle.com\/blog\/#website","url":"https:\/\/themeisle.com\/blog\/","name":"Themeisle Blog","description":"WordPress Tutorials and Reviews for Beginners and Advanced","publisher":{"@id":"https:\/\/themeisle.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/themeisle.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/themeisle.com\/blog\/#organization","name":"VertiStudio","alternateName":"Vertigo Studio SA","url":"https:\/\/themeisle.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","contentUrl":"https:\/\/mllj2j8xvfl0.i.optimole.com\/cb:c5QE.37290\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/themeisle.com\/blog\/wp-content\/uploads\/2024\/02\/VertiStudio_logo1.png","width":718,"height":156,"caption":"VertiStudio"},"image":{"@id":"https:\/\/themeisle.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/themeisle.com\/blog\/#\/schema\/person\/bfcf13d809aa7475daa80492363e6117","name":"Yisela Alvarez Trentini","url":"https:\/\/themeisle.com\/blog\/author\/yisela\/"}]}},"_links":{"self":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/62805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/comments?post=62805"}],"version-history":[{"count":7,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/62805\/revisions"}],"predecessor-version":[{"id":79775,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/posts\/62805\/revisions\/79775"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media\/62389"}],"wp:attachment":[{"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/media?parent=62805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/categories?post=62805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/tags?post=62805"},{"taxonomy":"hashtags","embeddable":true,"href":"https:\/\/themeisle.com\/blog\/wp-json\/wp\/v2\/hashtags?post=62805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}