If you would show pdf in content dynamically, which page would you like to show page, post or wherever. You have to echo your shortcode in template file. For example, you have to print like below
<?php echo do_shortcode("[shortcode pdf=". $_REQUEST["pdf_id'] ."); ?>
http://yourwebsite.com/post-title/?pdf_id=20 //your url would be like that
Related Posts:
- How to create a shortcode with 1 parameter (atts)
- How to get URL param to shortcode?
- How to add multiple buttons to TinyMCE?
- Custom form, shortcode, and submit handler
- Custom Shortcode and Button not Working after 3.9 update
- Add attribute to existing Shortcode
- Simple contact form with field validation
- Raw output (preventing wpautop)
- other shortcodes in Contact form 7 MAILS [closed]
- How to add and submit input fields using a shortcode?
- How to Get a part of URL and put in shortcode?
- Get URL Param Plugin and Inserting Result in Widget Code
- How can I implement shortcode on click event
- Form Shortcode not saving data to WP database
- Getting error on submitting form using Ajax with shortcode
- Adding custom form within add_shortcode
- Can I pass parameters to the add_shortcode() function?
- Modifying the wordpress login page and then referencing it with a shortcode problem
- Form processing: How to process form before output and access data from shortcode
- Putting a space between the buttons [closed]
- Create shortcode for each form field in contact form 7
- How can I use a plugin shortcode inside of a html form?
- Problem parsing long parameter in shortcode
- Adding Author URL to Nav Menu via Shortcode
- User name in referral URLs
- How do I point bloginfo(‘stylesheet_directory’) to my parent theme?
- Create Button for Shortcode in Text Editor
- Send Mail with link to current_user
- Shortcode not interpreted if parameter set
- Contact form code not working. Need help!
- Add an access code form to call a unique page based on page without registration
- Is it possible to change a shortcode parameter based on a media query?
- WordPress shortcode select option not working [closed]
- How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?
- wordpress shortcode url decode non Latin character
- Using get_option() in JavaScript
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How to display the site name in a WordPress page, or post
- How can I put a wp_redirect into a shortcode?
- Native “playlist” shortcode random playing… How?
- Stop strip_shortcodes() stripping content inside shortcodes
- How do i link gallery thumbnails to different url’s using the wp native gallery?
- how to grab first link in post… and of course call it
- How to save a shortcode in a Gutenberg custom block?
- Is shortcode_unautop() broken?
- Some doubts about gallery shortcode in WordPress
- Dynamically create shortcodes using add_shortcode and a callback
- How can I make a shortcode from this code?
- Change register form action url
- Meta tags in shortcode
- Adding PHP/HTML code inside page from custom template
- ShortCode and extra
- How to change page title (from a plugin) in twentytwentyone theme
- WordPress Code Standards and Working $link Parameters In Shortcode
- shortcode get thumbnail size
- Shortcodes Keep Wrapping in
- If you add a shortcode programmatically, but the code isn’t viewed on that request, is it still executed?
- Problem with using custom shortcode with ACF WYSIWYG field
- Populate shortcodes with table data and get next row
- Running shortcode with variable that is modified
- Shortcode is not processed when added to option field using wp_editor
- How to apply an ID to Shortcode Embedded iframe
- wp_list_pages shortcode jumps above previous content
- Using $this from child class inside shortcode function
- How to trace shortcode to its functionality
- shortcode issue in the_excerpt
- If else with shortcodes
- Using shortcodes to communicate my page design
- How to check if a post has any one of many shortcodes?
- Use Contact Form 7 with Ajax
- Is it possible to add a shortcode’s content to a table?
- How to build a shortcode for tabs
- Creating tabs shortcode
- SImple Example To Update User Info From Front End [duplicate]
- How to turn this HTML code into a shortcode? (adding song lyrics and giving an id to a div)
- Wrap template code with shortcodes
- my form does not insert any data in the database
- How to pass parameters in wordpress shortcode?
- Can Someone Help me to Correct my shortcode for displaying a category?
- Shortcode custom query not passing value
- Simulate shortcodes with javascript
- How to use Shortcode from one WordPress page in another WordPress page?
- Add addtional page parameter before loading the page
- Unknow shortcode read on display site
- the_excerpt displaying code inside style tag
- WordPress Server Time not changing/displaying correctly
- How to make a shortcode with a line break in it parse correctly?
- Plugin Shortcode value in post
- Woocommerce Filter Main Loop by Tag [closed]
- Shortcodes: override a shortcode / change shortcode on the fly
- Separating Custom Template logic
- Remove width and height attributes from [gallery] output
- woocommerce Product shortcode create [closed]
- A number appears inside a div called wpb_wrapper, when I use a custom shortcode
- Help with Shortcode Functionality
- Shortcode Site include in a other
- Why is my ajax live search not working when i use a shortcode to call it?
- How do write this type shortcode? [closed]
- WordPress functions.php shortcode is not working [closed]
- My first WordPress shortcode just returning []