Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7593577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:12:17+00:00 2026-05-30T21:12:17+00:00

I have created a theme options panel for a client however they would like

  • 0

I have created a theme options panel for a client however they would like the ability to enter PHP code in the textareas and have it executed on the front end.

However, when they enter the code, it does not display properly in the front end, please see the following two screenshots:

https://i.stack.imgur.com/Gm9Qv.png

https://i.stack.imgur.com/UXeVO.png

It looks like the code is being stripped when displayed on the front end. Its displayed using this code:

    <?php global $options;
foreach ($options as $value) {
    if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
}
?>

<?php echo $ag_footer_top; ?>

How can I get it to work properly? Is it possible?

If I enter the following into the theme options:

<?php wp_nav_menu( array( 'theme_location' => 'first','fallback_cb'=> ” ) ); ?>

It gets saved INTO the database as:

<?php wp_nav_menu( array( \'theme_location\' => \'first\',\'fallback_cb\'=> ” ) ); ?>

And its displayed on the front end as:

\'first\',\'fallback_cb\'=&gt; ” ) ); ?&gt;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:12:18+00:00Added an answer on May 30, 2026 at 9:12 pm

    First of all you must prevent WordPress from adding slashes to your content, using something like:

    update_option('my_option',stripslashes($_POST['my_option']));
    

    The other thing is that you want your code to be executed… well I do not know how to do this exactly, but a lot of Plugins provide this functionality, like

    Linkable Title Html and Php Widget

    You should download the Plugin and figure out how it works.

    Just take the content of the field from the database now and try to parse it in some way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create 10 plots that have different data, but the same
I have an existing toolbar and would like to add tabs to it that
I have created a few DTS packages and saved them on the server. where
I have created a simple grid of divs by left floating them and an
I have created some simple charts (of type FastLine) with MSChart and update them
I have created a debugger visualizer in VS2008. There are two classes i've made,
I have created XML file,but I can't view it/output it.I know there is no
I have created 5 NSDictionary's. I stored them in NSArray. I need to get
I have created HTTP handlers. How do I create global variables for these handlers
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.