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
- convert it into short code & explan how? [closed]
- Enqueue Scripts / Styles when shortcode is present
- Conditionally Loading JavaScript/CSS for Shortcodes
- What does extract( shortcode_atts( array( do?
- Why “?v=hash” is added to my URLs? [closed]
- How do I escape a ‘]’ in a short code?
- Pass boolean value in shortcode
- Show shortcode without executing it
- Shortcode always displaying at the top of the page
- Redirect function inside a Shortcode
- how to show the syntax of a shortcode
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- current_shortcode() – detect currently used shortcode
- shortcodes output before content [duplicate]
- WordPress plugin shortcode not working
- How to add stylesheets only to pages with specific shortcode?
- use query string in URL to display content on the page
- Using get_option() in JavaScript
- Shortcode empty attribute
- How does a shortcode work?
- Shortcode outputs at the top of the_content
- the_excerpt and shortcodes
- Using wp_editor in shortcode
- Remove wpautop from shortcode content / remove whitespace in buffering
- Encode text string being appended as query to URL [closed]
- Get current post id witout passing in shortcode
- Why are you using add_action for shortcode?
- Check if post/page has gallery?
- Get first video from the post (both embed and video shortcodes)
- Get shortcode name from within it’s callback function? [duplicate]
- Wordspress add into my javascripts
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- How do I create a Shortcode that returns text if domain is .com, not .co.uk
- Using preg_replace to separate gallery from the_content?
- Remove specific shortcode from get_the_content()
- How to display the site name in a WordPress page, or post
- Hide/show content starting in the middle of a paragraph
- Combining shortcode and get_template_part
- How can I put a wp_redirect into a shortcode?
- Escaping quotes from shortcode attributes
- Run visual composer code in php page
- short code output too early
- Shortcode in shortcode: How to append variable?
- Remove wptexturize from a shortcode?
- How can i put an array as variable in shortcode_atts?
- Autoembeds don’t work with paragraphs
- Table of Contents with a shortcode
- Create custom [sourcecode] shortcode, the right way?
- TED talks shortcode not working
- Allowing shortcodes inside attributes
- What is the best way to enable nested shortcodes?
- Tinymce – How to hook before or after live shortcodes rendering?
- How to customize a shortcode using the customizer
- Native “playlist” shortcode random playing… How?
- How to Output HTML tags in do_shortcode?
- List of all inbuilt WordPress shortcodes
- Nested Shortcode Detection
- Shortcode output always showing at top of page
- Organizing shortcodes. How to display all of them and their attributes?
- How to detect if a Shortcode is being called on a page?
- How to get current page title inside a page itself in a shortcode and in page content
- how to have the gallery shortcode output one single UL list instead of several DL?
- Implement If-ElseIf-Else-EndIf with short codes
- Short code to display a loop