Hi,
I am using category blog layout for my menu item. Now I want to add advertisement codes between articles displayed in a menu item. Can you tell me how to do?
Please see attache scrennshot for reference.
Thank you and regards,
Hai
<script type="text/javascript">(function($) {$(document).ready(function() {
if( $('.blog div[itemprop="blogPost"]').size() > 0 ) {
var advno = 1;
var rowno = 1;
var colno = 1;
$('#gkFooterArea .custom a').each(function(){
switch(advno) {
case 1:
rowno = 1;
colno = 1;
break;
case 2:
rowno = 1;
colno = 2;
break;
case 3:
rowno = 2;
colno = 1;
break;
case 4:
rowno = 2;
colno = 2;
break;
case 5:
rowno = 3;
colno = 1;
break;
case 6:
rowno = 3;
colno = 2;
break;
case 7:
rowno = 4;
colno = 1;
break;
case 8:
rowno = 4;
colno = 2;
break;
case 9:
rowno = 5;
colno = 1;
break;
case 10:
rowno = 5;
colno = 2;
break;
}
advno++;
$('.blog .items-row:nth-child('+rowno+') div[itemprop="blogPost"]:nth-child('+colno+')').append( $(this) );
});
}
});})(jQuery)</script>