• Resolved jorge2904

    (@jorge2904)


    When I write a post in visual mode the editor strips <p> tags this is a pain since the p tags are style through CSS shouldn’t the editor add them every time you hit enter??? I i try to add them through the HTML editor it works but as soon as I switch back to visual it strips them again. This is also a problem because it takes away some semantic meaning to the the data.

    Is there any way to force it to add the <p> tags.

Viewing 4 replies - 1 through 4 (of 4 total)
  • When I write a post in visual mode the editor strips <p> tags

    And I bet you that it doesn’t! What is far more likely is that one of your stylesheets is resetting the margins on the p tag to 0, thereby destroying the normal top & bottom margins. I’ve checked into a number of similar complaints previously and every single one turned out to be a CSS issue.

    Thread Starter jorge2904

    (@jorge2904)

    There definetly not there take a look

    https://dev.j9consultants.com/gbs/

    This theme use the home.php and the text is loaded using

    <?php
    $page = get_page_by_title( "Welcome to GBS Group", ARRAY_A );
    echo "<h2>{$page['post_title']}</h2>";
    echo $page['post_content'];
    ?>

    There is a CSS Reset but I set the code I want p‘s to use after the reset… Its also not only margin but font-size as well and styles as well

    I’m still right, though.:-) It isn’t WordPress that’s removing your ‘<p>’ tags. It’s the theme code. Try replacing echo $page['post_content']; with the_content() or

    <?php
    $content = apply_filters('the_content', $page['post_content']);
    $content = str_replace(']]>', ']]>', $content);
    echo $content;
    ?>
    Thread Starter jorge2904

    (@jorge2904)

    Thanks, It didn’t know that the tags are added through the LOOP functions… I didn’t use its since it was only one page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘<p> tags in posts’ is closed to new replies.