I miss typed the code above.
I’ve tried <?php echo do_shortcode ('[artpal=insert]'); ?> however this just displays the text [artpal=insert]
Your second script is correct in theory, but for some reason the script is not matching up the tag in the array of callbacks used to route shortcodes to the correct functions.
Try a var_dump() of the global $shortcode_tags to determine why there is no match. You might also try calling whatever callback is listed here for that tag directly.
In other words, the array should have an entry similar to
["artpal=insert"]=>
string(18) "some_function_name"
You could try calling some_function_name() from your template.
Thanks for the help bcworkz. I tried your suggestion of var_dump($shortcode_tags) but strangely the artpal shortcode was not listed. However it turns out I will not be using the artpal plugin due to a massive security risk in the coding. I think I’ll need to revert to using something like WP e-commerce.
Turns out if you save the product page off-line and view/edit the page source you can manually set the price of a product as the paypal button has it in a simple list for all to see and edit.
<input type=”hidden” value=”134″ name=”item_number”>
<input type=”hidden” value=”300.00″ name=”amount”>
<input type=”hidden” value=”GBP” name=”currency_code”>
<input type=”hidden” value=”1″ name=”quantity”>
That explains why do_shortcode() doesn’t work. The shortcode handler must be added and removed dynamically only during content output, or filtered in some other manner. Seems like the author took some measures to only allow the shortcode to work in content and nowhere else.
I’m not sure how massive a risk that really is, you would want a parallel payment verification process in any case that would catch any price tampering. But I can see how this would make you uneasy, which is reason enough to seek alternatives.