Sorry, my english isn’t very well, maybe thats the problem. I try it again:
If i create a WYSIWYG-Field with ACF and call it in the template files with:
<?php the_field('nameoffield') ?> oEmbed doesn’t work. It only shows the video url.
But if i used the standard editor from WordPress and i paste a video url in it, the oEmbed works as expected and i can see the video on the frontend.
Tanks in advance!
I am having the same issue: links to youtube videos are not showing up as embedded videos, they only show as the link.
I am using ACF 188.8.131.52 and WP 3.5.2. I’m showing the content by applying the the_content filter on the get_field.
It’s strange, some videos are showing up, but if I go in and resave the post, then the videos do not show up anymore.
Great! I’m stuck in a bind trying to fix this, since it’s a live site!
In case this helps, I took a look at the database values of each of those links…
Not working link:
@elliot I edited the database entry to remove the html paragraph tags, and then they showed up again.
I can’t replicate the issue locally which means this issue is circumstantial – the hardest to find and fix!
So, if the ACF WYSIWYG field saves the value with
<p> tags around the url, then the url is not converted?
Can you try and find the cause of the issue?
Perhaps it is caused when saving in the HTML / Text view?
Had you used the HTML button to edit the HTML?
What if you delete the text, and paste in the url again on a new line?
Any other plugins running on the WYSIYWG such as tinymce advanced?
Any debug info will be great!
@elliot Sorry to bother you on this one. The only fix I have is to use the iframe embed code, and paste it into the html view of the wysiwyg. I don’t have any other plugins running on the field. Tried all the other tricks you listed. Any chance of chatting offline?
Now it works for me!
I installed the Add-on WordPress Wysiwyg (http://www.advancedcustomfields.com/add-ons/wordpress-wysiwyg/). That did the job!
@elliot: Can you explain me the difference between the “WYSIWYG-Editor-field” and the “WP WYSIWYG field”?
Thanks in advance!
The default WYSIWYG field uses the JS tinymce object to instantiate the field. This allows it to work within a repeater field.
The add-on WordPress WYSIWYG field does not use JS to create itself, instead if uses PHP (wordpress function) to create the editor. This however does not work within a repeater.
I’ve done some debugging and found that WP is preventing the embed preview.
There is some code within the WP preview function that prevents the embed form being loaded / returned (during ajax call) if the post being edited does not exist.
The post will never exist because you are editing a term, not a post.
This security measure is stopping the preview from working, however, the embed should still work when outputting the value on the template. Can you test this?
I’ve added this to my to-do and may be able to trick WP into thinking it is editing a post instead of a term!
The topic ‘oEmbed for WYSIWYG’ is closed to new replies.
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!
© 2023 Advanced Custom Fields.