Strange markup bugs when logged in with Genesis Sample child theme

Hey guys, I activated a Genesis Sample child theme and for some reason I’m getting strange <br> tags inserted in various places

<h3 class=“fl-callout-title”>
<span class=“fl-icon”>
<br>
<i class=“fa fa-bullhorn”></i>
<br>
</span>
<p></p>
<p>
</h3>

like that ^. The plugin is working with the Dynamik child theme but all my other pages are functioning fine just not the beaver pages… have you seen this before? thanks!

I should also mentioned this is ONLY when logged in, if I’m not logged in everything outputs fine… strange

Hey Josh,

Does it happen on all BB pages? Does it happen when you load a layout template as well? Can you swap themes real quick and see if you get the same thing? Lastly, would it be possible to ask for temp admin access to the site so we can check further?

Ben

  1. Yes on all bb pages when logged in.
  2. When a layout template is loaded, everything looks fine, once the template is published, the issue occurs again
  3. The issue appears to be only with the genesis sample child theme by studiopress
  4. I just switched to a different child theme which fixed the problem. The Studiopress sample child theme was supposed to be a blank slate so the issue is strange. I can’t provide admin access unfortunately.

Maybe you guys should test it because the problem may happen with other themes?

Anyway thanks for the help!

Okay another weird update, the issue started happening on the child theme 2. I made some customizations to child 2 before the issue occured, so i installed a blank one again (child 3, no issues) and made the same customizations, but still no issue.

Trying to debug here but no idea what could insert <p> tags before <span> tags AND <br> tags before <i> tags in your builder content - this is some wordpress default behavior maybe ?

Deactivating the builder removes the <p> tags and the <i> tags disappear completely, this suggests the bb plugin is inserting the added tags for some reason right?

Example of blurb working fine

<h3 class="fl-callout-title">
<span>Instant Contracts & Invoices</span>
<span class="fl-icon">
<i class="fa fa-file-text-o"></i>
</span>
</h3>

Example of blurb with added tags

<h3 class="fl-callout-title">
<span>Instant Contracts & Invoices</span>
<span class="fl-icon">
<br>
<i class="fa fa-file-text-o"></i>
<br>
</span>
<p></p>
</h3>

Really don’t get why this happens with the same theme, even though I didn’t change this setting at all. In any case this code (added to functions.php or custom plugin) appears to fix the issue:

function rm_wpautop($content) {
    global $post;
    remove_filter('the_content', 'wpautop');
    return $content;
}

add_filter('the_content', 'rm_wpautop', 9);

In this case it seems the wordpress auto p function was the culprit, so removing it has done the job. I’ll update if there are future issues.

Hey Josh,

Glad you figured it out, and thanks for sharing how you fixed it! Let us know what you find and/or if you need anything further! :slight_smile:

Ben