Forums

[resolved] get_the_content with <p> (4 posts)

  1. asumaran
    Member
    Posted 1 year ago #

    I'm trying to get the post content, using get_the_content() to make a plugin that translates my blog posts from Spanish to English

    The problem is when I use in loop $post = get_the_content()
    It retrieves only text without <p> </p> between blocks of texts, so google translate returns a bunch of words without html formatted.

    How I can get the post content ( formatted, purified or processed, I don't know how to say ) with paragraphs?

    Thanks in advance.
    sorry my bad english.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    You need to apply filters as described here in the Codex.

  3. asumaran
    Member
    Posted 1 year ago #

    thank you!

  4. vtxyzzy
    Member
    Posted 1 year ago #

    You are welcome! Now, please use the dropdown at top right to mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic