Home › Forums › ACF PRO › Getting just the url that was entered into an oEmbed field inside a variable › Reply To: Getting just the url that was entered into an oEmbed field inside a variable
Hi @Elliot Condon,
Thanks so much for the help. Your solution worked, though I had to change my whole loop because I was no longer able to access fields by their field names, instead I had to use the database name thingies that look like this: ‘field_5445285988c8b’ and I needed different code for the image since the returned value for that was changed, and I had to add a new field for the title as I couldn’t figure out how to get the title attribute from the image in WordPress. Not sure how complicated things would get with other kinds of fields, but for now it’s working great with those minor changes.
If you were wondering, the reason for all this is so the user can see an immediate preview of their youtube video in the backend, and it’s easier for them to paste an entire YouTube link rather than getting the 11-character video ID from the URL, which is how I’ve done it in the past.
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.