Toby
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Fixing WordPress
In reply to: HTML Comment in Post Content Makes Everything Commented OutNone of the above solutions are working for me.
If I comment something like this
<!--<p>[ENTER DESCRIPTION]</p>-->After hitting the publish button I get
<!--</p> <p>[ENTER DESCRIPTION]</p> <p>--></p>I have removed all filters I can think of in my functions.php
remove_filter( 'the_content', 'wptexturize' ); remove_filter('the_content', 'convert_char' ); remove_filter('the_content', 'wpautop' );I have tried plugins also but still cannot use html comment tags.
Anyone found a solution for this??
Forum: Plugins
In reply to: [Simple Fields] how to call an attached image from simple fieldsThanks a bunch Par.
Here’s the code I used to build a small author box that appends to the end of an article.
//Add Author Box if its entered function get_author_box($content) { global $post; $author_name = simple_fields_value('author_name'); $author_bio = simple_fields_value('author_bio'); $author_pic = simple_fields_value('author_pic'); $end_of_content = <<<EOC <div class="author_box"> <img src="{$author_pic["url"]}" alt="$author_name" width="100" height="100"/> <div class="author_bio"> <h4>Written by $author_name</h4> $author_bio </div> </div> EOC; return ( ( is_single() || is_sticky() ) && simple_fields_value('author_name') == true) ? $content . $end_of_content : $content; } add_filter('the_content','get_author_box');I built the image tag myself to control the size of the image on the fly.
Hope that helps someone.
TobyPS Great plugin dude. Good work going the free route.
Viewing 2 replies - 1 through 2 (of 2 total)