Hi,
Thanks. Yes it makes perfect sense. But unfortunately I can't get it to work.
On my CPT I have a file_upload field where I load the PDF file. ( ID=my_pdf_upload_file )
I then have a text field where I paste in the code.
$files = rwmb_meta( 'my_pdf_upload_file' );
foreach ( $files as $file ) {
$url = $file['url'];
echo do_shortcode('[pdf-embedder url="{$url}"];
}
but when I display the page I see the code displayed and an error saying Missing PDF "https://sitename/pdfs/123/%7B$url%7D"
or sometimes "PDF Embedder requires a url attribute" when I try different quotes or double quotes.
Not being a coder, well especially not where WordPress is concerned, I'm at a loss.
Thanks
Alan