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>
Solved my problem by using this post: https://support.advancedcustomfields.com/forums/topic/oembed-change-iframe-src-to-data-src/
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,
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.