{"id":13559124,"date":"2020-10-20T18:45:42","date_gmt":"2020-10-20T18:45:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/random-banner-3\/"},"modified":"2020-10-20T18:45:42","modified_gmt":"2020-10-20T18:45:42","slug":"random-banner-3","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/random-banner-3\/","title":{"rendered":"Random banner"},"content":{"rendered":"<p>Is it possible to set up one custom banner with Javascript code? Like this for random imagem:<\/p>\n<p>&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\nvar images = [],<br \/>\nindex = 0;<br \/>\nimages[0] = &#8216;<a href=\"\"><img decoding=\"async\" src=\"\" alt=\"\" \/><\/a>&#8216;;<br \/>\nimages[1] = &#8216;<a href=\"\"><img decoding=\"async\" src=\"\" alt=\"\" \/><\/a>&#8216;;<br \/>\nindex = Math.floor(Math.random() * images.length);<br \/>\ndocument.write(images[index]);<br \/>\n&lt;\/script&gt;<\/p>\n","protected":false},"template":"","class_list":["post-13559124","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13559124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/13559124\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=13559124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}