Forum Replies Created
-
AuthorPosts
-
alanjacobs
ParticipantI have the same issue as well, but using Bricks.
Also tried using Gutenberg to add the shortcode, but get the same error.
alanjacobs
ParticipantHi,
I'm also trying to do this using CPTs.
In your examples above, why do you have the post_fields="title, content" part?
This just seems to add extra fields to the existing CPT. So why is it needed? Or is it?
Thanks
AlanMay 6, 2021 at 4:55 PM in reply to: ✅How to make a pdf upload field automatically display the pdf #27961alanjacobs
ParticipantHi,
I have tried all sorts of combinations of quotes and double quotes ... but no change.
I have added the code into both a text field and a Shortcode field on the Elementor Single Post Template.I have reduced the issue down to the pdf-embedder call now, so I do not think this is a metabox issue.
My code is now simply ...
$mediaurl = 'https://mysite/wp-content/uploads/2021/05/Sample.pdf'; echo do_shortcode( ' [ pdf-embedder url=$mediaurl ] ' );But it still generates the Missing PDF error.
I have raised this with the pdf Embedder team.Thanks for your help and sorry to pester you with another plugins problem!
May 4, 2021 at 10:06 PM in reply to: ✅How to make a pdf upload field automatically display the pdf #27906alanjacobs
ParticipantHi,
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
Alanalanjacobs
ParticipantAh many thanks, that works.
I was using https://metabox.io/plugins/custom-post-type/ which is still showing the old version.
Cheers
Alanalanjacobs
ParticipantHi, Excuse my ignorance ... but how do I upgrade the CPT module?
I have not seen an update at the WordPress level for the Metabox plugin.
I can not see what the current version of any of the extensions is, so how to tell if it is upgraded?The free download still shows the 1.9.1 version so I can't upgrade manually.
What am I missing here?
Thanks
alanjacobs
ParticipantMAny thanks. Waiting for the update to drop. 🙂
alanjacobs
ParticipantHi, I have the same problem.
I want to create a CPT with pure metabox fields - no WP gutenburg nonsense.
I want the Title value to be constructed from the contents of some other fields in the CPT - hence want the Title filed to appear at the bottom of the CPT.So I also expected unticking the Title in the Supports tab to remove the Gutenburg stuff.
The other issue is that I can't see a field to replace the Title in the Metabox fields. ( Unlike Taxonomy which is there and works fine )Thanks
Alan -
AuthorPosts