The product ID is necessary to display a specific product via the product-shortcode.
There are generally 2 ways to find out the product ID.
1) the product URL in the backend, there you can find the product ID:
2) You add the product ID into the product overview. This can be done with just a few lines of code. When using the ChildTheme, simply add the code using the functions.php:
Preferably all the way to the end.
If you are not using the ChildTheme you can also add it as a plugin. Simply access your installation via FTP and create the folder “mu-plugins” in the folder “wp-plugins”. Afterwards you can create a file there (e.G product_id.php) and add the following code:
After that you save the data. Now you will see a new register that displays the product ID under the register “Products” in your backend.
Additional information about adding functions can be found HERE.
Was this article helpful?