• Resolved gunness

    (@gunness)


    hello,

    i’ve got a problem:

    1. i’ve built a wysiwyg-metabox in my functions.php:

    	$cmb->add_field( array(
    	'name'    => 'Textspalte links',
    	'desc'    => '',
    	'id'         => $prefix . 'wysiwyg_spalte_links_home',
    	'type'    => 'wysiwyg',
    	'options' => array(
            'wpautop' => false,
            'media_buttons' => false,
            'textarea_rows' => get_option('default_post_edit_rows', 5),
        ),
    	) );

    2. then I put the following code in my theme:

    <div class="text">
      <p>
         <span class="dropcap font-alt">L</span>
            <?php $wysiwyg  = get_post_meta( get_the_ID(), '_smm_wysiwyg_spalte_links_home', true );
    echo esc_html( $wysiwyg );
    ?>
      </p>
    </div>

    this takes my text in the metabox to the frontend.

    3. unfortunately my text looks like this in the frontend:

    L<p>orem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p> <p> </p> <p>At vero eos et accusam et justo duo dolores et ea rebum.</p>

    it shows the html markup and I can not make a line break.

    can somebody please help me?

    thank you!

    gunness

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wysiwyg wrong output’ is closed to new replies.