skip to Main Content

How to get DIV sub-elements using javascript – Jquery ajax

HTML Code <ins class="adsbygoogle" style="display:inline-block;width:336px;height:280px" data-ad-client="ca-pub-1714167228247329" data-ad-slot="8611448539" data-adsbygoogle-status="done" data-ad-status="unfilled"> I have checked : https://www.w3schools.com/js/js_htmldom_elements.asp and tried but it not help. I want to take this element data-ad-status="unfilled" from HTML using javascript. So, i can use it in if else statement.…

VIEW QUESTION

Show only if user-role is subscriber AND site visitor (WordPress)

I am a bit stuck with the code below for my Wordpress site: <?php $user = wp_get_current_user(); $allowed_roles = array('subscriber', 'visitor'); if ( array_intersect($allowed_roles, $user->roles ) ) echo '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXXXX" crossorigin="anonymous"></script>' ?> I want the Adsense code only be…

VIEW QUESTION
Back To Top
Search