Note that there are some explanatory texts on larger screens.

plurals
  1. POUnwanted <p> tags in shortcode output. wpautop filter already removed
    primarykey
    data
    text
    <p>I've written a simple shortcode for Wordpress that outputs a group of inside yet another according to a particular content search.</p> <p>Problem is, I keep getting this <p> tags in my output, which mess up my code a bit. While I can live with it, I can't live happily.</p> <p>I have already added</p> <pre><code>remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); </code></pre> <p>in the "functions.php" of my theme. But the result is the same.</p> <p>Shortcode code is as follows: </p> <pre class="lang-php prettyprint-override"><code>$return = "&lt;div class='tarimas-teaser-container'&gt;"; $n = 0; if ($wp_qry-&gt;have_posts()): while ($wp_qry-&gt;have_posts()): $wp_qry-&gt;the_post(); $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($wp_qry-&gt;post-&gt;ID), 'thumbnail'); $return .= "&lt;div class='tarimas-teaser-unit'&gt;&lt;h4&gt;&lt;a href='{$wp_qry-&gt;post-&gt;guid}'&gt;{$wp_qry-&gt;post-&gt;post_title}&lt;/a&gt;&lt;/h4&gt;"; $return .= "&lt;a href='{$wp_qry-&gt;post-&gt;guid}'&gt;&lt;img src='{$thumb[0]}' width='{$a['ancho_img']}' height='{$a['alto_img']}' class='tarimas-teaser-img' /&gt;&lt;/a&gt;$div_precio"; $return .= "&lt;/div&gt;&lt;!--tt-unit--&gt;"; endwhile; endif; $return .= "&lt;/div&gt;&lt;!-- ttttt-container --&gt;"; return $return; </code></pre> <p>I don't even have newlines on the constructed code. Yet I get this:</p> <pre class="lang-html prettyprint-override"><code>&lt;div class='tarimas-teaser-container'&gt; &lt;div class='tarimas-teaser-unit'&gt; &lt;h4&gt;&lt;a href='http://www.tarimasterhurne.es/productos/roble-blanco-arena-1199020372/'&gt;Roble Blanco Arena&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;&lt;a href='http://www.tarimasterhurne.es/productos/roble-blanco-arena-1199020372/'&gt;&lt;img src='http://www.tarimasterhurne.es/wp-content/uploads/2012/07/1199020372_main-150x150.jpg' width='100' height='100' class='tarimas-teaser-img' /&gt;&lt;/a&gt; &lt;div class='precio mini'&gt;10,93&lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;!--tt-unit--&gt; &lt;div class='tarimas-teaser-unit'&gt; &lt;h4&gt;&lt;a href='http://www.tarimasterhurne.es/productos/roble-marron-rojo-1199020368/'&gt;Roble Marrón Rojo&lt;/a&gt;&lt;/h4&gt; &lt;p&gt;&lt;a href='http://www.tarimasterhurne.es/productos/roble-marron-rojo-1199020368/'&gt;&lt;img src='http://www.tarimasterhurne.es/wp-content/uploads/2012/07/1199020368_main-150x150.jpg' width='100' height='100' class='tarimas-teaser-img' /&gt;&lt;/a&gt; &lt;div class='precio mini'&gt;11,03&lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;!--tt-unit--&gt; &lt;p&gt;&lt;!-- ttttt-container --&gt;&lt;/p&gt; </code></pre> <p>It's driving me crazy. Again: I already removed wp_autofilter in functions.php.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload