Hugo

Insert a href img in sidebar

Hi.

I am using theme mainroad and on the sidebar I would like to display an ad.

Here is what I have in html

<a href=https://someurl.com?utm_source=blogger&utm_medium=banner&utm_campaign=whatever" target="_blank" rel="nofollow" onclick="ga('send', 'event', 'Banner', 'Click', 'Vendor');"><img src="https://www.domain.com/images/banner.png"></a>

I tried to “convert it” to markdown but it is failing.

<div class="widget-vendor widget">
        <h4 class="widget__title">Vendor</h4>
        <div class="widget__content">
            <p>
                   Link: [Vendor](https://someurl.com?utm_source=blogger&utm_medium=banner&utm_campaign=whatever)
                    Image: ![Vendor](https://www.domain.com/images/banner.png)

            </p>
        </div>
    </div>

How can create an ad with image pointing to external webpage?

I have a similar setup and all you got to do is put your code in between a div. It should work for you.

1 Like

Missing " :dizzy_face: