• Resolved Puddleglum

    (@puddleglum)


    $lcp_display_output .= $this->get_content($post, 'p', 'lcp_content');

    is producing the following when viewed from the Chrome Inspector
    `<div class=”lcp_catlist”>
    <div>
    <h4 class=”lcp_post”></h4>
    <p class=”lcp_content”></p>
    <p>My post content p1</p>
    <p>My post content p2</p>
    <p>My post content p3</p>
    </div>
    </div>

    code formatting mine.

Viewing 1 replies (of 1 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    Hi @puddleglum

    This is not a bug. This is happening because you used p as html tag in your template. Important thing to note here is that browser developer tools do not show the actual raw html but how the brower understands the html after having parsed it. So if instead of looking at dev tools you take a look at the page source, you will discover that the LCP plugin wrapped the content just as you wanted.

    So why are dev tools showing what you are seeing? This is because if you use a p tag you will inevitably end up with nested p elements – this is invalid html. If you use almost any other tag in your template function it will work nicely.

    • This reply was modified 7 years, 1 month ago by zymeth25.
Viewing 1 replies (of 1 total)
  • The topic ‘POSSIBLE BUG $this->get_content($post, ‘p’, ‘lcp_content’); Malformed markups’ is closed to new replies.