How to add product IDs next to product titles

Some stores use product ID as an SKU in which case its necessary to display the product ID on the catalog itself. Here’s how do to that:

This is the quick way – ideally this shouldn’t be done on included templates directly but on your own templates in your child theme directory.

Assuming you are using the Vertical Thumbnail List template. Open wp-content/plugins/pdfcatalog2/templates/pdf/thumbnaillist/product.php

Search for <?php echo $post->post_title ?>  (should be around line 10 but varies depending on which plugin version is installed). Right before </h2> on the same line add the following:

(<?php echo $post->ID; ?>)

It should look like this:

<h2 class="product_title">
<a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $post->post_title ?></a> (<?php echo $post->ID; ?>)</h2>

Save the file, clear the PDF cache and you should now see the product IDs next to each product title.