Revisions
- October 4, 2012 @ 03:10:42 [Current Revision] by PeterLugg
- October 4, 2012 @ 03:10:30 by PeterLugg
- October 4, 2012 @ 03:09:32 by PeterLugg
- October 4, 2012 @ 03:08:20 by PeterLugg
Revision Differences
October 4, 2012 @ 03:09:32 | Current Revision | ||
---|---|---|---|
Content | |||
Deleted: See this post: | Added: See this post: http://www.web- templates.nu/ 2008/08/31/get_ the_content-with-formatting/ | ||
Unchanged: Normally the <em>get_ the_content()</em> tag returns the content without formatting. I found out a solution to make<em>get_the_ content()</em> tag return the same content as <em>the_content()</em>. | Unchanged: Normally the <em>get_ the_content()</em> tag returns the content without formatting. I found out a solution to make<em>get_the_ content()</em> tag return the same content as <em>the_content()</em>. | ||
Unchanged: [php] | Unchanged: [php] | ||
Unchanged: function get_the_content_ with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { | Unchanged: function get_the_content_ with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { | ||
Unchanged: $content = get_the_content( $more_link_text, $stripteaser, $more_file); | Unchanged: $content = get_the_content( $more_link_text, $stripteaser, $more_file); | ||
Unchanged: $content = apply_filters( 'the_content', $content); | Unchanged: $content = apply_filters( 'the_content', $content); | ||
Unchanged: $content = str_replace(']]>', ']]&gt;', $content); | Unchanged: $content = str_replace(']]>', ']]&gt;', $content); | ||
Unchanged: return $content; | Unchanged: return $content; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: [/php] | Unchanged: [/php] | ||
Unchanged: In your theme, call the function within the loop: | Unchanged: In your theme, call the function within the loop: | ||
Unchanged: [php] | Unchanged: [php] | ||
Unchanged: get_the_content_ with_formatting(); | Unchanged: get_the_content_ with_formatting(); | ||
Unchanged: [/php] | Unchanged: [/php] |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.