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; ?>


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 ...


1

If you really want to execute code stored in a database, a quick google search reveals that you can use the eval() function to do just that. However, many people do say that Eval is Evil... Instead of storing the entire PHP code of an option in the database, try storing a simple boolean flag for your option and then test whether to get your template's ...


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?



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