Had a bit of a brain wave and thought I would capture the output and return
it in the function. Turns out it fixed the problem so the final code ended up looking like this:
function amazon_video($atts){
extract(
shortcode_atts(
array(
'file' => $file
),
$atts
)
);
$url = get_bloginfo('url');
$return = "<embed
src="".$url."/jwplayer/player.swf"
name="player"
width="640"
height="480"
bgcolor="#000000"
allowscriptaccess="always"
allowfullscreen='true'
flashvars="file=".$file."
&streamer=rtmp://xxxxxxxxxxx.cloudfront.net/cfx/st
&provider=rtmp"
autoplay='false'
/>";
return $return;
}
add_shortcode('amazon_video','amazon_video');
Related Posts:
- the_excerpt and shortcodes
- Get first video from the post (both embed and video shortcodes)
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Stop strip_shortcodes() stripping content inside shortcodes
- Videos via the video shortcode are always 640px wide?
- How to handle valueless attributes in shortcodes?
- Shortcode content does not show in feed discription/excerpt
- How can I get the [video] shortcode to allow query string parameters?
- Easy way to show excerpts of specific posts on a page
- Video shortcode – autoplay all videos
- Video Shortcodes not working in WordPress
- Shortcodes in excerpts returning empty string
- How can I implement shortcode on click event
- Using _e() on text inside video tags prints that text, instead of only showing when html5 element is not supported
- Retrieving post excerpt as a shortcode
- Shortcodes in RSS excerpts
- shortcode issue in the_excerpt
- Add div on EMED Tag
- How to Get Shortcode in Excerpt to follow Document Flow
- Excerpt Length & List Category Posts Plugin
- Hide download option video shortcode
- shortcode doesnt work on excerpt
- Remove figcation from excerpt
- Video Short Code and Media Fragments URI
- the_excerpt displaying code inside style tag
- How to strip header tags & shortcodes from the_excerpt()
- Running Filter or Shortcode Before Query Prevents Excerpt from Showing
- Pull in excerpt with shortcode
- Video Shortcode Only Returning a Link
- How to stop unwanted splits in excerpts when using shortcodes for sliders or players
- Inserting shortcode is blanking excerpt – any ideas?
- Wpautop stops working after get_the_excerpt
- Custom shortcode being executed when saving page in wp-admin
- Change appearance of shortcode text inside editor
- Shortcode output always showing at top of page
- How to detect if a Shortcode is being called on a page?
- shortcode inside another shortcode
- Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]
- WordPress gallery ‘post_gallery’ filter doesn’t work with feeds?
- shortcode to create dynamic dropdown box form shortcode attributes
- Ajax not returning anything on form submit
- How do I add my own custom shortcodes?
- Remove images from get_the_excerpt
- Can’t seem to get [shortcode]s to work
- nested Shortcode doesn’t work
- Slow page loading when using a simple shortcode on the same page multiple times
- TinyMCE get selected text and underlying HTML
- Remove and restore one shortcode
- Rewriting WordPress Gallery Shortcode with Bootstrap Carousel
- Using do_shortcode with variables?
- Using ACF field in do_shortcode()
- Display content from another site page using a shortcode
- Remove hyperlink on gallery shortcode
- Combining similar shortcode functions?
- Creating a shortcode based on users preferences
- Get a post’s thumbnail url or display default image in shortcode
- Convert HTML Script to Shortcode [closed]
- What is the Correct way to pass parameters in function
- Shortcode – Getting Categories appears on top of website
- How to Modify WordPress Default Image Gallery Shortcode
- Passing html tags as shortcode parameters
- Registration Form Shortcode
- Conditionally Loading JavaScript/CSS for Shortcodes
- Placing tags on wordpress visual editor using shortcodes
- how can i pass this attribute in this shortcode?
- How to add a same div on every page
- WordPress Shortcode / Only works in classic editor, gutenberg error / invalid json response
- Display a form partially with a shortcode
- Do shortcode in template file
- Modifying the wordpress login page and then referencing it with a shortcode problem
- Pass instance number to shortcode child
- Render shortcodes with get_post_custom
- Pass a comma separated shortcode attribute to a function
- Build Clickable Link Using Multiple Attributes
- Using Shorcodes in Sharing Preview and Notifications Title from Post Title
- Is the WP audio shortcode still relevant?
- If statement shortcode
- Shortcode not working when I output data from wpdb html table row
- update_metadata() appends shortcode data for every page refresh
- How do I point bloginfo(‘stylesheet_directory’) to my parent theme?
- Gallery shortcode is empty but magically creates a gallery
- Hide disclaimer from summary excerpts
- How to avoid one code multiple times instead do that through some function? Shortcode, but I think shortcode is not used in main theme’s core files?
- Shortcode appeared twice on page, one time before content, one time where it’s really called
- Add a shortcode in woo-function.php
- Get current category and place it in shortcode
- Woocommerce products shortcode specific order
- Modify Blog Module layout in Child theme
- Output html source tags inside shortcode
- How can I define the output of shortcode attribute value?
- Using shortcodes that wrap around code
- Shortcode for Admin Theme Option?
- What is the best way to include a template file within a shortcode?
- What makes a placeholder resizable in Tinymce?
- Shortcode templates
- Does anyone recognize shortcode ig_special_heading?
- How to scroll to a shortcode-generated anchor
- add post type pram to wp shortcode
- How to reuse php templates as shortcodes?
- Shortcode attributes from meta query variables