I'm new with PHP. I have a wordpress plugin, which I just installed, that displays my designed zazzle's t-shirt on my website (powered by wordpress; self-host). It requires a shortcode, [zazzle rows="3" cols="3"], but that only works in the pages and posts. I want to place it on my website's template, just before the footer.php's first line, '</div>'. I tried to put its shortcode [zazzle rows="3" cols="3"] at footer.php & saved my amendment but it appeared as a text on my website. In other word, that shortcode doesn't work outside page (page.php) & post (post.php). To help you help me, this is from the plugin's php (part of it): // Shortcode handlers add_shortcode('zazzle', 'zazzle_shortcode'); function zazzle_shortcode($atts) { $shortcode_atts = shortcode_atts(array( rows => 4, cols => 4, ), $atts); return fetch_gallery($shortcode_atts); } Code (markup): I want to create a php code something like this ... (below) ... so that I can place it on footer.php. My proposed codes: <?php if (function_exists('zazzle_shortcode')): ?> <?php zazzle_shortcode('array(3,1)'); ?> <?php endif; ?> Code (markup): or <?php if (function_exists('zazzle_shortcode')): ?> <?php zazzle_shortcode('rows="3" cols="1"'); ?> <?php endif; ?> Code (markup): Obviously my proposed codes are wrong/not-functioning and hence, I am asking for your help. It could be very easy for you but isn't for me. Many thanks in advance.
It seems to work! But currently, zazzle's server not responding, will try again later. Thank you guys. <?php echo do_shortcode('[zazzle rows="3" cols="3"]'); ?> Code (markup):