• I need to capture the output of a shortcode that is basically all the informatoin for a product from a shopping cart plugin im using. I want to do this in the backend area though as i want to gather the information for other uses.

    I have tried adding the following code to my themes function.php:
    echo do_shortcode("[product id='1']");

    but that simply just prints [product id='1']. Though when i add that shortcode to a post, it works perfectly. Am i missing something? Is shortcode access somehow disabled from the admin interface?

    Any help would be sincerely appreciated.

Viewing 1 replies (of 1 total)
  • Thread Starter MACscr

    (@macscr)

    note, i found out it works within single.php. So now i just have to figure out why i cant use it within functions.php for use anywhere on the site, let alone the admin area where i need it.

Viewing 1 replies (of 1 total)

The topic ‘capture shortcode output for use in admin?’ is closed to new replies.