WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding wpautop to theme options? (2 posts)

  1. flint_and_tinder
    Member
    Posted 2 years ago #

    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);
    	 ?>
  2. flint_and_tinder
    Member
    Posted 2 years ago #

    No probs I've done it. Just needed to remove the first echo:

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

Topic Closed

This topic has been closed to new replies.

About this Topic