How to add a Pinterest feed

You have the option of adding a Pinterest feed in two layouts - 4x2 (suitable for the sidebar) and 6x1 (suitable for the footer, you can replace the Instagram feed with it).

Copy one of the codes below and paste it in a HTML/JavaScript widget in one of the widget areas in Layout. Replace USERNAME with your Pinterest username.

Layout: 4x2

<script>
$.ajax({
dataType: 'jsonp',
type: 'GET',
url:'https://widgets.pinterest.com/v3/pidgets/users/USERNAME/pins/'
}).done(function(response) {
var pins = response.data.pins;
var html = '';
for (var i = 0; i < 4; i++) {
var description = pins[i].description;
var dominantColor = pins[i].dominant_color;
var imageUrl = pins[i].images['237x'].url;
var url = pins[i].id;
html += '<div class="pinterest-item"><a href="https://www.pinterest.com/pin/' + url + '/"><div class="pinterest-image" style="background:url(' + imageUrl + ')"></div></a></div>';
}
$('.pinterest').html(html);
}).fail(function() {
console.log('erro');
});
</script>
<div class="pinterest"></div>

Layout: 6x1

<script>
$.ajax({
dataType: 'jsonp',
type: 'GET',
url:'https://widgets.pinterest.com/v3/pidgets/users/USERNAME/pins/'
}).done(function(response) {
var pins = response.data.pins;
var html = '';
for (var i = 0; i < 6; i++) {
var description = pins[i].description;
var dominantColor = pins[i].dominant_color;
var imageUrl = pins[i].images['237x'].url;
var url = pins[i].id;
html += '<div class="pinterest-item"><a href="https://www.pinterest.com/pin/' + url + '/"><div class="pinterest-image" style="background:url(' + imageUrl + ')"></div></a></div>';
}
$('.pinterest-row').html(html);
}).fail(function() {
console.log('erro');
});
</script>
<div class="pinterest-row"></div>