• Resolved Jenst

    (@jenst)


    I need multiple the_content(); tags. Is there a way to get the_content(); as a string? That way I could create unique strings for the_content();.

    I have found the $post->post_content; but that only give me the raw text without the text formatting tags.

    I have tried gobal $content; echo $content; but that don’t seems to work.

    I know there are filters and hooks but changing the_content() does not work for me, because I need to create multiple versions / strings / the_content() for different posts.

    Possible solutions:
    1. Give me a string that contains the_content(); with text formatting.
    2. Give me a good way with hooks / filters to create multiple the_content() tags.
    3. Give me an SQL query that solves this.
    4. Give me a plugin that makes this possible.

    Help! Thanks in advance!

Viewing 1 replies (of 1 total)
  • Hi Jenst,

    Not sure if you have found the solution yet. Anyway, the solution is:


    echo apply_filters('the_content', $post->post_content);

    Hope this helps :).

Viewing 1 replies (of 1 total)
  • The topic ‘$post->post_content; with formatting?’ is closed to new replies.