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

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

OK, attempting to remove the with jQuery is counter intuitive. Modifying it via output buffering is inefficient. And we shouldn't edit the actual widget code itself, since this will revert back next time we update WordPress. I would suggest either creating your own text widget, or simply extend and modify the existing WordPress widget as follows (put the ...


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