I'm pretty new to Wordpress and I'm a bit stuck.
I have created a site and I'm linking to Amazon. I read their ToS and I'm not allowed to hardcode the price in because of price fluctuations. I signed up to the API and got my key and have programmed a function to query the API for the price of an item using the ASIN. This works fine, but when I try to use it in a post it doesn't work.
I downloaded the "Insert PHP" plugin so I can use shortcode to call my function and echo out the price.
This works partially, but when I echo the returned string it's wrapped in <p>
tags so I cannot echo it out in a <h2>
tag properly.
How can I get this to work? Is there a way I can echo it out without being wrapped in the <p>
tags?
Thanks
<?php echo "item price"; ?>
Is all I was using essentially but the "Insert PHP" plugin seems to wrap it in<p>
tags, but I found out after a bit of research, the way I should do it, is create a shortcode of my own for my function.