• Hi,
    Is there a way to output php tags through the get_option function ?

    Example: in my theme option, i have a textarea wich contains php code. I return the value of this field like this:

    <?php print get_option(‘textarea’); ?>

    But all the php tags return like if they were commented :

    <!--?php
    
    ?-->

    Any help would be greatly appreciated !

Viewing 3 replies - 1 through 3 (of 3 total)
  • I believe there’s a plugin that allows you to have php code but by default, I don’t believe you can do it

    Thread Starter Cedric

    (@cooperanet)

    PHP-EXEC does the job when the code is in the content of a post, a page or a widget but has no influence on functions like get_option.

    you’re not trying to run code on the get_option, you’re trying to run the get_option within code, so php-exec should work for you.

    php-exec executes the code within the tags. which is what you’re trying to do, you’re not trying to have code run when the get_option function is being called.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get_option and php tags’ is closed to new replies.