Manually adding Shop the Post content output to a theme (Developer)

NOTE: This article is written for developers or customers with advanced knowledge of their theme code and PHP. It is meant to be used only if you are trying to specifically customize where Shop the Post appears within a third-party theme (i.e., one not built by EmPress).


Our Shop the Post plugin automatically displays in our themes according to our theme demos (see several examples here). For themes not created by EmPress, the Shop the Post plugin will automatically display after the post excerpt, or content.

In these cases, if you wish to prevent the plugin from displaying Shop the Post automatically and add it manually to your theme instead, go to  Customize > Shop the Post and check the box to Disable automatic code output. Again, this step is not necessary if you are using a theme by EmPress.

Then, edit your theme files and add the following line of code where you would like the Shop the Post content to appear:

<?php if( function_exists('em_shop_the_post')) { em_shop_the_post(); } ?>