If the API provides the list price then I’m sure I can add it to the plugin. I should be doing an update soon so I’ll make sure that’s one of the changes I put in.
Cheers,
Paul
Paul, thanks a lot. Looking forward to that!
Having another little hiccup now with the plugin (please forgive me for asking):
I am trying to wrap the shortcode into a responsive table. Simplified it looks like this:
<div width="90%"> //table 90% of content width
<table width="100%">
[amazon asin=... ] //item 1
[amazon asin=... ] //item 2
</table></div>
using a template like:
<tr>
<td width="50%">%LINK_OPEN%%TEXT%%LINK_CLOSE%</td>
<td width="20%">%PRICE%</td>
<td width="30%">%LINK_OPEN%Buy it%LINK_CLOSE%</td>
</tr>
As a result, however, for some reason I have two <br>
line breaks inserted in between the <div> and the <table> tags!
They do not seem to be from WP, as the wpautop functions inserts <br />
tags, not `
.
That makes me wonder if it could be your plugin inserting these line breaks, maybe because the template functions “realizes” that the table markup is “incomplete” (as the <table> and </table> tags are outside the template?
If so, can I somehow, somewhere change that – or even better: override it, so that I do not need to temper with the plugin code directly?
Thanks a million
sorry, that messed up sentence was to be:
They do not seem to be from WP, as the wpautop function inserts <br />
tags, not <br>
, i.e. without slash. Here we get the <br>
, slash-less!
Hi,
The plugin shouldn’t affect anything in the post other than replacing the [amazon…] content. I had a search through the code just in case and could not find any <br>
tags in the code apart from innocuous javascript.
Similarly the Template parser only changes the %…% items. What you are trying to do should just work, very odd.
Just tried doing the same on my site and if I ‘inspect’ the page using Chrome, I too see the double <br>
. However if I ‘view source’ they are not there, just the html as you put in the post (Also the other ‘br’ tags in the rest of my post are rendered as <br\>
when ‘viewing source’ but rendered as <br>
when ‘inspecting elements’.
So the double <br>
being inserted might be to do with some other unrelated part of the table? I noticed Chrome has also added ‘tbody’ tags as well.
Hope this helps…
Paul
OK, found the culprit: it’s the usual suspect: wpautop function!
So WP thinks it should “space things out a little” (wp-includes\formatting.php, line 223), and table is such a “spacable” item.
Have no how to get WP not to do it, don’t want to mess with WP code directly, and generally disabling the wpautop function is no option either, so all I can do is work with negative margins to “lift” the table up again. What a mess…
As for the ‘tbody’: have not found out where that comes from, but as long as it does not disturb my layout I can live with it.
Anyway, thanks again for all your help – and the speed of it! 5 stars from me!