Tag Info

Hot answers tagged

3

Try removing (image), like this: <?php $content = get_the_content(); $content = preg_replace("/<img[^>]+\>/i", " ", $content); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); echo $content; ?>


3

The value of the textarea must be printed between the opening and the closing tag: <form action="/"> <textarea name="whatever"><?php echo esc_textarea( $description ); ?></textarea> </form> Note the usage of the function esc_textarea() here. It prevents any possible character inside the variable $description from being ...


1

This seems to do it: function allow_nbsp_in_tinymce( $mceInit ) { $mceInit['entities'] = '160,nbsp,38,amp,60,lt,62,gt'; $mceInit['entity_encoding'] = 'named'; return $mceInit; } add_filter( 'tiny_mce_before_init', 'allow_nbsp_in_tinymce' ); Any improvement suggestions?


1

Do you mean you want the Post content to be used as a placeholder text in a forms text box? I guess you could do something like this if that is what you are trying to do.. <?php $content = the_content(); ?> <form action="demo_form.php"> <input type="text" name="postvalue" placeholder="<?php echo $content ?>"> <input ...


1

Use the Paste as Text button, or paste into the Text tab instead of the Visual tab.


1

In the latest version of WordPress, there a text color option in the default WYSIWYG, which is TinyMCE. Look for this option: Custom styling for tables is not supported by default in WordPress.


1

You could refer to this: function my_formatter($content) { $new_content = ''; $pattern_full = '{(\[raw\].*?\[/raw\])}is'; $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($pieces as $piece) { if ...



Only top voted, non community-wiki answers of a minimum length are eligible