[resolved] Help! Widget showing HTML code as plain text! (3 posts)

  1. tharok
    Posted 6 years ago #

    Hi! Im trying to do a widget that shows some info in tabs. Everything is working OK but when I add some HTML (img and formatting tags) the widget shows the code as plain text.

    I show the content of the widget with a simple echo:
    <div id="fragment-1" class="content"><?php echo $aData["35MM"]; ?></div>

    And this is how I save changes on the CP options:

    if( isset( $_POST['cabeceraListenIn_35MM'] ) )
                $aData['35MM'] = stripslashes($_POST['cabeceraListenIn_35MM']);
                update_option( 'cabeceraListenIn', $aData );

    (There are 5 tabs ("fields") but I only include 1 here for the example).
    What Im doing wrong??

  2. Samuel B

    Posted 6 years ago #

  3. tharok
    Posted 6 years ago #

    Fixed! That wasn't what I want to do but reading the code I remembered "ob_" and "eval". Using them I got my widget 100% functional.


Topic Closed

This topic has been closed to new replies.

About this Topic