The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Custom Content Type Manager
[resolved] Need to disable wpautop for my ecpt fields (2 posts)

  1. pzula
    Posted 3 years ago #

    I need to disable wpautop for my ecpt-created rich text editor because it is adding <p> tags around my shortcodes and (I think) making my shortcodes not work. (I have already tried adding do_shortcode but I do see that the editor is adding <p tags around my content, so I think this is a multi-layer problem).

    Do anyone know how to disable wpautop? This is the code I have so far:

    <?php $leftsidebar = get_post_meta($post->ID, 'ecpt_left_side', true); ?>
    			  <?php if ($leftsidecontent != NULL) { ?>
    			<div class="TwocolLeft">
    				<?php echo $leftsidecontent; ?>
    				<?php echo do_shortcode($leftsidecontent); ?>
    			<div class="TwocolRight">
    				<?php the_content(); ?>
    			<?php } else { ?>
    				<?php the_content(); ?>
    			<?php } ?>


  2. fireproofsocks
    Plugin Contributor

    Posted 3 years ago #

    you probably want to use the http://codex.wordpress.org/Function_Reference/wpautop function.

    You can probably save yourself a lot of time and headache if you use the convenience functions provided by the CCTM: get_custom_field() and print_custom_field(). There's a "do_shortcode" output filter that includes an option for this very thing: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/do_shortcode_OutputFilter

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic