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:08:20 | Current Revision | ||
---|---|---|---|
Content | |||
Added: See this post: http://www.web- templates.nu/ 2008/08/31/get_ the_content-with-formatting/ | |||
Added: 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>. | |||
Added: [php] | |||
Added: function get_the_content_ with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { | |||
Added: $content = get_the_content( $more_link_text, $stripteaser, $more_file); | |||
Added: $content = apply_filters( 'the_content', $content); | |||
Added: $content = str_replace(']]>', ']]&gt;', $content); | |||
Added: return $content; | |||
Deleted: | Added: } | ||
Added: [/php] | |||
Added: In your theme, call the function within the loop: | |||
Added: [php] | |||
Added: get_the_content_ with_formatting(); | |||
Added: [/php] |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.