After Using get_the_content() “/>” are automatically added into my content
-
Hi, I’ve been searching this forum and the whole net to try and find a solution to the problem I’m having, but nobody seems to have the same exact problem. So hopefully someone here can help…
I wrote a function where I needed to edit the_content(), so I used get_the_content() and all was fine, except then my plugins didn’t work. So I found a solution:
function get_the_content_with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = str_replace(']]>', ']]>', $content); $content = apply_filters('the_content', $content); return $content; }
That worked great, but all of a sudden at the beginning of all my pages there is now either “>” or “/>” at the beginning of where my content starts, and its in a <p> tag which I assume wordpress puts around it as auto formatting. Its really annoying and I can’t figure out why its being put there or how to get rid of it.
If anyone knows why this could be happening or how I can fix it I would appreciate the help. If you need more info let me know.
- The topic ‘After Using get_the_content() “/>” are automatically added into my content’ is closed to new replies.