Link images
-
Did you guys ever make a way to link these images?
-
If you are wanting to link all of the images to the same URL, you can simply wrap the shortcode in a link.
However, if you are wanting to load a different link per each image, there currently isn’t a way to do that. It could be done, but the solution would probably be a bit hacky… which is why it hasn’t been implemented in the plugin.
how would you do it?
Found a solution by adding this script
<script type=”text/javascript”>// <![CDATA[
//Random Banner image on Page Reload//store the images in arrays below
images = new Array(5);
images[0] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/Raczlab_paincast.jpg’> “;
images[1] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/WIP_paincast.jpg’> “;
images[2] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/Paincast-Expert_paincast.jpg’> “;
images[3] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/Medshop_paincast.jpg’> “;
images[4] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/Pain-Info-Podcast_paincast.jpg’> “;
images[5] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/ASIPP_paincast.jpg’> “;
images[6] = “<img src=’https://epimed.staging.wpengine.com/wp-content/uploads/2016/03/ABIPP_paincast.jpg’> “;
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// ]]></script>and deleting your plugin you should consider adding this feature whats the point of having an image without a link
Looking at that code, there is nothing to do with links though…
I haven’t the time to rewrite the plugin to support links at the moment. I threw the plugin together one night in about a half hour and have made minimal changes since then. Perhaps when I get some time I’ll consider it.
oh shit i meant
<script type=”text/javascript”>// <![CDATA[
//Random Banner image on Page Reload//store the images in arrays below
images = new Array(5);
images[0] = “<img src=’https://www.example.com’> “;
images[1] = “<img src=’https://www.example.com’> “;
images[2] = “<img src=’https://www.example.com’> “;
images[3] = “<img src=’https://www.example.com’> “;
images[4] = “<img src=’https://www.example.com’> “;
images[5] = “<img src=’https://www.example.com’> “;
images[6] = “<img src=’https://www.example.com’> “;
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// ]]></script>And my bad I was in a shitty mood yesterday its a good plugin and thats impressive you did it in 30 mins lol ill give you a 5 star
whoa thats crazy when i post the code and submit it wordpress automatically gets rid of the links lol maybe this will work `<p>[ezcol_3quarter]<iframe src=”https://player.vimeo.com/video/153132023?title=0&byline=0&portrait=0″ width=”850″ height=”400″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>[/ezcol_3quarter] [ezcol_1quarter_end]</p><p><script type=”text/javascript”>// <![CDATA[
//Random Banner image on Page Reload//store the images in arrays below
images = new Array(5);
images[0] = “<a href=’https://www.raczlab.com’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/Raczlab_paincast.jpg’> </a>”;
images[1] = “<a href=’https://www.wip-boe.org/’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/WIP_paincast.jpg’> </a>”;
images[2] = “<a href=’https://www.paincast.com/submit/’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/Paincast-Expert_paincast.jpg’> </a>”;
images[3] = “<a href=’https://www.medshop.com/’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/Medshop_paincast.jpg’> </a>”;
images[4] = “<a href=’https://ptpodcast.com/’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/Pain-Info-Podcast_paincast.jpg’> </a>”;
images[5] = “<a href=’https://asipp.org/documents/0416-AnnualMeeting-brochure.pdf’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/ASIPP_paincast.jpg’> </a>”;
images[6] = “<a href=’https://www.abipp.org/exams.aspx’><img src=’https://www.paincast.com/wp-content/uploads/2016/03/ABIPP_paincast.jpg’> </a>”;
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// ]]></script></p><p>[/ezcol_1quarter_end]</p>`No worries! It’s funny that it stripped only the stuff related to links. ??
- The topic ‘Link images’ is closed to new replies.