Home>Support>Outputting additional p tag

Outputting additional p tag

I am trying to create a widget and everything is working well and the code is being output however it is adding additional

br
and
p
tags in the markup.

Here is my template:

<a href="<?php echo $instance['url'] ?>" class="block <?php echo $instance['colour'] ?>">
    <h3 class="tile-title"><?php echo $instance['tile_title'] ?></h3>
    <?php echo esc_html ($instance['tile_body']) ?>


</a>

This is the code that is being output

<div class="so-widget-tile">
    <a href="" class="block yellow">
        

 ----> Extra 
        <h3 class="tile-title">Title Title</h3>
        This is where the tile body is going to go 


    </a>
      ----> Extra 
        <a href="" class="block yellow"></a> ---- Extra <a>
    


</div>

I have tried the usual code to stop this to no avail.

remove_filter( 'the_content', 'wpautop' );

remove_filter( 'the_excerpt', 'wpautop' );

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Taylor,

    Does this issue still occur if you comment out the anchor?

    If it does, just to rule it out, can you try disabling all non-SiteOrigin plugins (please leave only your plugin active) and see if this fixes the issue? You’ll need to clear all your caches after disabling your plugins.

    If it does fix the issue, then try re-enabling your plugins one by one until the issue comes back. This procedure will help diagnose which plugin is causing the issue.

    Once we know that, we’ll be able to look at what might be causing the conflict and either solve the problem or help you find an alternative plugin.

    If you aren’t using a SiteOrigin theme, then you can also try temporarily switching to one of the default WordPress themes to see if the issue is theme related.

  2. 7 years, 6 months ago taylorsuk

    Ok,

    So I’ve found the plugin culprit https://tickera.com So you have any suggestions as to how I can get around this?

    Thanks

  3. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Taylor,

    To be honest, I’m not really familiar with that plugin so I’m not too sure how it functions on a code level. Hm. How is it being used on the current page? Are you adding a widget or a shortcode or anything like that? If you’re using it on the page, try removing it – does it work now?

    Oh, and is Tickera affecting other widgets?

  4. 7 years, 6 months ago taylorsuk

    It seems a paid update with their plugin has worked…

    Many thanks for your help.

    Have you considered extending Page Builder to include a more ‘Advanced Custom Fields’ approach? That would be a page builder to end all page builders. As a developer I would look to make a custom set of widgets and then adjust the SCSS accordingly for each site I worked on. Ultimately offering a page builder that is ‘within brand guidelines’ (never trust a client to use the same colours / font sizes!).

    Many thanks Alex.

    Simon

  5. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Simon,

    Odd stuff. Thanks for letting me know mate.

    You can technically do this now through PHP by adjusting widget settings and row/widgets styles. I would recommend giving the Page Builder and Widget Bundle developer docs a read.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More