Support » Fixing WordPress » Adding wpautop to theme options?

  • Resolved flint_and_tinder

    (@flint_and_tinder)


    I’ve recently changed my theme options to use the Setting API and don’t know how to add wpautop to the code needed to pull in the theme options. According to the tutorial I need to pull in the options like this: <?php echo $vd_option['vd_home_text_pre_link']; ?>In order to add wpautop to my old theme options I did this:

    <?php
    $vht = get_option('vd_homepage_text');
    echo wpautop($vht);
    ?>

    Putting the two together I’ve come up with the following however it doesn’t work. Does anyone know what I need to do to fix it. I’m no PHP expert!

    <?php
    	 $vht = echo $vd_option['vd_home_text'];
    	 echo wpautop($vht);
    	 ?>

Viewing 1 replies (of 1 total)
  • No probs I’ve done it. Just needed to remove the first echo:

    <?php
    	 $vht = $vd_option['vd_home_text'];
    	 echo wpautop($vht);
    	 ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Adding wpautop to theme options?’ is closed to new replies.