Hi John,
I feel so stupid. Ofcourse I have to add the style= in front of it.
Thanks
Hi John,
In page-template.php
Background is a colorpicker ACF field
<?php
$background = get_sub_field('background');
?>
<section class="content <?php echo $background ?>">
<p> --------</p>
</section>
Hi JOhn,
Yes, i’m using YT video’s.
Yes, I have jQuery running (link to jQuery library in header.php).
I also tried the javascript in my site-main.js file without any luck.
Probably the script is the issue, nut I do not have any knowledge of javascript myself.
regards,
Roland
@john Huebner,
I came to this post because I see a huge difference in pageload when using Oembed video on my homepage.
The PHP function you provided removes the video completely. That’s Ok because you provided the javascript to reset the src value after the page is loaded.
The problem on my site is, that the src values aren’t reset after the page is loaded. This means the video isn’t displayed.
I’ve put the javascript code in the header.php.
What i’m doing wrong?
Regards,
Roland
Hi wstaley,
The background-color itself, not the hex value.
In the meantime I’ve solved it with flexible content.
regards,