I’ve just looked at the source of the WP_Embed class, and it appears they are not actually registering a shortcode, but hooking into the the_content
filter.
Change your code to
$content_desktop = apply_filters("the_content", get_the_content());
or manually trigger their filter with something like
$content_desktop = WP_Embed::run_shortcode(get_the_content());
or, if you prefer to have an object:
$myembeds = new WP_Embed;
$content_desktop = $myembeds->run_shortcode(get_the_content());
See also WP_Embed::run_shortcode in the codex, and the source code of class-wp-embed.php.
Related Posts:
- Get first video from the post (both embed and video shortcodes)
- TED talks shortcode not working
- Set wmode attribute to transparent for the embed shortcode to make drop-down menu hover over YouTube embed in Internet Explorer
- Hide Default Video Shortcode Controls on PageLoad
- WordPress core responsive video not working with shortcode
- Audio and video shortcodes not working properly
- Gist shortcode is not working
- Embedding Instagram via shortcode doesn’t work as advertised in official docs
- Instagram URL is converted into oEmbed
- Add custom setting that uses radio button to WP Gallery
- How to create a shortcode for embedding pdf in iframe?
- Check if post has gallery images/media
- Hook WP_Embed run_shortcode
- Detecting embeded video format
- Specifying a single file from multi-file GIST (wordpress.com) [closed]
- How to apply an ID to Shortcode Embedded iframe
- Responsive Embeds using default embed shortcode
- Auto embeds don’t work for attachment descriptions
- Is there any way to set the Featured image in wordpress post editor, using a Getty images embed code
- How to Enable embedding WordPress default gallery in comments?
- Do embed shortcode on wordpress ajax request
- Inserting a variable into a shortcode inside php
- How to stop unwanted splits in excerpts when using shortcodes for sliders or players
- Can’t get default values to work with custom shortcode
- Show shortcode without executing it
- How to create a shortcode with 1 parameter (atts)
- How does a shortcode work?
- Run visual composer code in php page
- Remove wptexturize from a shortcode?
- Using shortcode in Post title
- How to embed page content in a blog post
- How to create a shortcode to display a category description?
- Pros and cons of actions over shortcodes
- Correct way to pass information between seperate shortcode functions
- Extending Shortcode attributes
- How best to apply do_shortcode in media.php for captions
- If numberposts = -1 offset won’t work
- Shortcode are not working in Option tree textarea
- Localization inside shortcode not working
- Font Awesome Icons Won’t Work
- Woocommerce, ordering products by default on shortcode pages
- detect when shortcode ran for the last time
- How can a shortcode can take the place of the featured image in a post?
- Shortcode for Twitter Bootstrap Collapse
- Is there any inherent difference between add_filter() and add_shortcode() for modifying [caption]?
- Different uniqid when calld in wp_localize_script and shortcode
- How do I debug a short code?
- How to type shortcode-like text in WordPress TinyMCE visual editor?
- Does registering multiple shortcodes impact performance?
- Gallery shortcode – change link file image size? (not using default fullsize image)
- add action only if gallery shortcode attribute is equal to?
- Shortcode for order number [closed]
- Edit shortcode in post content programatically
- Adding shortcode field to edit gallery / Gallery Settings
- Hide Selection of Text From Archive, but Show on Single Posts
- How to display Feedburner subscription count as plain text via a shortcode in post/page editor of my WordPress blog?
- Function result goes outside div
- Shortcode in my childtheme is not working
- Displaying shortcode in footer
- Displaying shortcode output through Options Framework
- How to Generate html tags using shortcodes?
- Adding custom form within add_shortcode
- Use another action instead of the shortcode API to display the last time a user logged in
- how to add shortcode in wordpress container [duplicate]
- Get array of shortcodes within string
- Shortcode arguments to another shortcode
- Adding a custom field to do_shortcode [closed]
- Clearfix Shortcode
- How and when to include shortcode source files
- Use full size images in a specific gallery
- contact form 7 database short codes [closed]
- how to create a fav icon shortcode?
- How to deal with WordPress bug: can’t use wrapped and unwrapped shortcode on same post
- Video shortcode, option are not rendered
- Create shortcode for each form field in contact form 7
- Color on Shortcode insert that creates a button
- shortcode doesnt work on excerpt
- Adding Author URL to Nav Menu via Shortcode
- Displaying an interactive web map on my wordpress site
- Date Shortcode in Image alt and title tags
- access shortcode atts in template part
- May an attribute have no value?
- How to set up posts per page on WP
- SQL query to bulk change short code in all posts
- Display shortcode in text field with wordpress settings api
- How to strip header tags & shortcodes from the_excerpt()
- shortcode display metainformation as linked image
- Unable to make shortcode, what is wrong?
- How to display a page dependent on a url parameter supplied by a form/button page?
- WordPress plugin shortcodes not outputting anything
- WordPress Gallery with ID’s Shortcode not Working
- Featured image with link to post shortcode, image displaying above the post
- shortcode change variable base on user
- Inserting shortcode is blanking excerpt – any ideas?
- Escaping a shortcode so it displays as-is [duplicate]
- If do_shortcode is blank, return some message
- Previous/Next with the same category
- I’ve broken the short code for Contact Form 7!
- echo a shortcode in a shortcode code?
- Applying if (get_post_meta) to new shortcode