WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. pzula
    Member
    Posted 1 year 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>
    			<div class="TwocolRight">
    
    				<?php the_content(); ?>
    
    			</div>
    			<?php } else { ?>
    
    				<?php the_content(); ?>
    
    			<?php } ?>

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 1 year 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

Tags