How to pass ACF URL into PDF Embed Extension or Image Extension

[ad_1]

So I don't technically need this for images, just for PDFs, but the field type is the same, so if it works for one, it should work with both.

I'm using an extension to embed PDFs directly into the page. I can either select a file manually from the media library, or I can link from a URL.

I have tried creating an ACF field called "pdf", setting the type to URL, then inputting the URL that goes to the PDF, then I tried to do "Insert From URL" and did "[acf field="pdf"]. This unfortunately does not work. Does anyone know if it's possible to get this to work?

I'm using WordPress + Elementor and the PDF extension is PDF viewer for Elementor & Gutenberg.

Here is a screenshot of the insert URL thing: https://images2.imgbox.com/2d/4f/O8KWNQ93_o.png

I have tried using a field type of both text and URL

EDIT: If I try to make a clickable link and link to shortcode, it sends me to about:blank#blocked. Maybe resolving this will help?

[ad_2]
1 Comment
  1. This probably isn’t going to be super helpful but thought I’d reply anyway just in case.

    I’m reminded of this tweet: [https://x.com/swissspidy/status/624273909664350208](https://x.com/swissspidy/status/624273909664350208)

    I think the underlying issue is that the “Insert from URL” input field (I assume this is from the PDF viewer plugin?) is not expecting anything except an actual URL to be there.

    It’s not a matter of the type of ACF field used. The shortcode may not be evaluated there and even if it did, the context (i.e. “where am I?”) may be unknown and still not work like you want it to.

    There may be some creative workaround. Why don’t content editors just place the URL directly in there? I’m not following the need for an ACF field to be used to dynamically fill another backend field.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer