• Resolved DJABHipHop

    (@pressthemes1)


    Objective:
    I need a flexible solution that lets me choose how text is formatted for three different areas: (comment_text), post content (the_content), and excerpt text (the_excerpt). For each area, I want to be able to select one of the following formatting options:

    1. Auto:
      • What it does: Uses WordPress’s default formatting.
      • Behavior: Leaves everything as-is, which means the default wpautop filter is active (automatically wrapping paragraphs in <p> tags).
    2. nl2br:
      • What it does: Removes the automatic <p> tag wrapping and converts newline characters into <br> tags.
      • Behavior:
        • First, the wpautop filter is removed to prevent WordPress from automatically adding <p> tags.
        • Then, the nl2br filter is applied to convert newline characters (\n) into <br> tags. This is useful when I want to maintain line breaks exactly as I type them without extra paragraph tags.
    3. None:
      • What it does: Removes any automatic formatting.
      • Behavior: Only the wpautop filter is removed, with no additional formatting applied. This means the output will display exactly as entered without WordPress adding any extra HTML tags.
Viewing 1 replies (of 1 total)
  • Plugin Author Bowo

    (@qriouslad)

    @pressthemes1 thanks for the suggestion. Looks like a very specific requirements that is better done via a code snippet, perhaps in functions.php.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.