0

This is my first post. I have the plugin powerpress loading an external image from an unsecure source that causes mixed elements so the page is not fully secured and I get the message "not fully secure". The plugin offers a great shortcode where you can add a default image but is not working with the latest version. This is the image I want to remove from the DOM, hopìng I will get a full secure page.

<div class="wp-playlist-current-item">
    <img src="">
<div/>

I have followed the theme instructions and installed the plugin Custom Scripts for Customizer. I have used this code that removes the image from chrome’s console but not from the live page.

jQuery(document).ready(function($) {
$('.wp-playlist-current-item img').remove();
});

The code is not throwing any errors but is not working. I have tried no conflict Jquery and putting the code in both header and footer.

This is how the code is printed:

<script type="text/javascript">
    /* <![CDATA[ */
        jQuery(document).ready(function($) {
        $('.wp-playlist-current-item img').remove();});
    /* ]]> */
</script>

Hope someone can enlighten my ignorance! Thanks in advance to any such delighful creature...

0

Please try this code snippet and put it in the footer.php file.

jQuery( window ).load(function($) {
  $('.wp-playlist-current-item img').remove();
});

or

jQuery( window ).load(function($) {
  $('.wp-playlist-current-item').find('img').remove();
});
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.