Title: Include optional URL parameter
Last modified: August 30, 2016

---

# Include optional URL parameter

 *  [edmyersjr](https://wordpress.org/support/users/edmyersjr/)
 * (@edmyersjr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/include-optional-url-parameter/)
 * Before I get into this, I’d just like to say thank you for all of your great 
   work on this plugin. It is a must have for anyone serious about including video
   in their wordpress blog and I make sure to install it (or rather my revised version
   of it, which I’ll explain below) on every one of my client sites. It does a much
   better job of presenting youtube and other video clips for my responsive sites.
 * One feature I feel is missing however is the ability to optionally pass a url
   parameter instead of a video id into the shortcode. The [youtube id=”xxxx”] format
   is much cleaner, of course, but services like IFTTT that can automatically create
   posts based on postings to video platforms like youtube do not have direct access
   to the id, but DO get the URL. In this way, you can include the video URL in 
   the post content. In IFTTT I can easily create an automated post that includes
   a shortcode [youtube url=”{{the_url}}”] and the description. But the id parameter
   is not available through IFTTT. You can just include the embed through IFTTT –
   but I think your plugin does a much better job of handling this.
 * I forked your project on github and added an optional url= parameter to the youtube
   shortcode that then extracts the id from the URL. This way, I was able to create
   a rule in IFTTT that creates a new post on my sites any time a video is posted
   to a youtube channel. The post includes the video via your shortcode and the 
   youtube description and publishes it (either as a draft or published). Automates
   a lot of work and saves editors time, and it works great! I know you already 
   have a method for extracting the id from the URL that you use with your tinymce
   button. If instead of requiring an id property for the shortcode, you could just
   require an id OR a url, then use the logic you already have for extracting the
   id, but just do it on the server side when you render the embed if the url parameter
   is included. id parameter could take precedence if both are provided.
 * It would be awesome if this feature were implemented in your core plugin. I hope
   you think it would be as useful for your other users as I have found it to be
   for me and will consider adding it in a future release!
 * Thanks again for your great work!
 * [https://wordpress.org/plugins/advanced-responsive-video-embedder/](https://wordpress.org/plugins/advanced-responsive-video-embedder/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Nico](https://wordpress.org/support/users/nico23/)
 * (@nico23)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/include-optional-url-parameter/#post-6478978)
 * So you coded something so
 * [youtube url=”[https://www.youtube.com/watch?v=123456″%5D](https://www.youtube.com/watch?v=123456″%5D)
 * instead of
 * [youtube id=”123456″]
 * will work as well? If you forked and modified my plugin why not send me a pull
   request and I see what you coded and maybe include it.
 * I have no idea of IFTTT I but do you realise that you not need shortcodes and
   just can have a the URLs on their own lines?
 * I not really inderstand why you are forced to post specific shortcodes with IFTTT,
   meybe **they** should chance their code to make it more flexible?
 *  Thread Starter [edmyersjr](https://wordpress.org/support/users/edmyersjr/)
 * (@edmyersjr)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/include-optional-url-parameter/#post-6479077)
 * Sorry for the delay getting back to you, didn’t see your reply until today.
 * Exactly right. With a small change you can use:
 * [youtube url=”[https://www.youtube.com/watch?v=123456″%5D](https://www.youtube.com/watch?v=123456″%5D)
 * OR
 * [youtube id=”123456″]
 * either one would work. How I implemented was a little sloppy – you would probably
   do a better job of it – but I’ll do a pull request this weekend when I have a
   minute so you can take a look
 * When I put the urls on their own lines (without shortcode), the standard embed
   was taking over.
 * IFTTT watches the youtube rss feed for new videos, when one is created, it creates
   a post. You have access to the video title, description, url, and embed code 
   to use in creating the post.
 *  Plugin Author [Nico](https://wordpress.org/support/users/nico23/)
 * (@nico23)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/include-optional-url-parameter/#post-6479079)
 * Sure the standard embed was taking over? Maybe IFTTT messes with it because ARVE
   actually disables WordPress’ default embeds for the providers its supports.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Include optional URL parameter’ is closed to new replies.

 * ![](https://ps.w.org/advanced-responsive-video-embedder/assets/icon-128x128.png?
   rev=3338557)
 * [Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick ...](https://wordpress.org/plugins/advanced-responsive-video-embedder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-responsive-video-embedder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-responsive-video-embedder/reviews/)

## Tags

 * [automation](https://wordpress.org/support/topic-tag/automation/)
 * [ifttt](https://wordpress.org/support/topic-tag/ifttt/)
 * [parameters](https://wordpress.org/support/topic-tag/parameters/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [url](https://wordpress.org/support/topic-tag/url/)
 * [Youtube](https://wordpress.org/support/topic-tag/youtube/)

 * 3 replies
 * 2 participants
 * Last reply from: [Nico](https://wordpress.org/support/users/nico23/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/include-optional-url-parameter/#post-6479079)
 * Status: not resolved