You can save your website’s URL into a variable and pass it to the shortcode:
$url = site_url();
echo do_shortcode("[timeline src="https://wordpress.stackexchange.com/questions/284281/$url/rest-of-the-url/"]");
You should also be able to use your shortcode in the following way:
echo do_shortcode("[timeline src="".site_url()."/rest-of-the-url/"]");
Related Posts:
- Prevent “main” WPMU site_url() being returned in functions
- Run function from parent on child site
- What’s the difference between home_url() and site_url()
- Solution to render Shortcodes in Admin Editor
- Use AJAX in shortcode
- Include PHP file in Content using [shortcode]
- Shortcode producing headers already sent error
- How to add attributes to a shortcode
- How to display random users with avatars
- Enabling shortcodes for custom fields
- Implementing DNS Prefetching with WordPress
- How to use get_media_embedded_in_content function
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Shortcode with parameters inside parameters
- Creating a table from shortcode avoiding wpautop for each row
- Changing a function in function.php to a shortcode – for listing categories of only a certain post type
- Stripping shortcode from custom excerpt function
- how to create shortcode in wordpress
- What is wrong with this Shortcode? I get it in a wrong place inside the content
- Display random text from a file with the WP built-in AJAX API
- Set first oembed in post to a global variable or function
- Formatting post content to exclude gallery
- Remove images from get_the_excerpt
- Shortcode with custom content attribute?
- Problem with extract() with custom shortcode
- Shortcode to insert menu in page body?
- Using locate-template & shortcodes doesn’t appear to work
- Displaying a random user with a shortcode
- Passing HTML in WordPress Shortcode arguments
- Adding body class when post contains a specific shortcode
- Different functions file for each site in multisite installation?
- Function to show only first instance of shortcode
- Display a text message if the shortcode is found?
- Delete pages and Create default pages for all new network sites
- Multisite, either change the name of sample-page or create new page
- creating shortcode to pull json array
- Custom Shortcode, functions PHP WP_Query loop
- Loop (iterate) through Multi-Site sub-sites (blogs)?
- Pass Shortcode Attribute to footer Script
- Global functions on WPMU
- Super simple shortcode not working
- Detect Safari desktop browser and include the detection in a shortcode
- My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)
- Display gallery on top before content
- List child pages of specific page using shortcode
- restore_current_blog required after switch_to_blog, if I use that in a function?
- How to extract the variables out from “add_shortcode” function?
- Display first name of logged in user?
- How to get specified parent page title in my function
- Possible to display shortcode based on the category?
- WordPress shortcode attributes for database SELECT?
- Shortcode pagination not advancing
- create shortcode to list users with specific meta key value
- Variable if post is sticky in functions.php
- Run function when WordPress new multisite is created or ACF field is updated
- Having issues with a foreach inside of a shortcode with ACF gallery
- What do the schemes login, login_post, admin, and relative mean?
- Shortcode inserts paragraphs before and after executing shortcode
- Display post shortcode content in the sidebar?
- How to get the index number of the posts?
- Using shortcode content with nested shortcode
- How can I make a widget shortcode to control all the widgets?
- Custom shortcodes not inserting into visual composer columns
- How to filter $content in shortcode function
- Create a custom taxonomy that will be used to create and filter markers in a Google Map
- Conditional Gravity Forms filter in WordPress Multisite
- Setting youtube size in functions.php
- Multisite Ajax serialize return error [object Object]
- Adding a colorbutton in tinymce dialog with current api
- Passing variable as add_shortcode argument
- Creating new blog on multisite programatically without hacks?
- How to get correct URLs in network wide menu (Multisite)?
- Display gallery on bottom after content
- Add button to kitchen sink toggle
- Multisite 404 on pages – rewrite error breaks database
- Excerpts are not displayed by a shortcode on category pages
- Has is_archived() for sites in a multisite changed with WP 4.7?
- Redirect to another page using contact form 7? [closed]
- WordPress Shortcode function display outside of widget
- check if the user is owner of current page
- Function that outputs second theme url
- shortcode help require
- Optimizing a WordPress site
- Help With Creating Shortcode
- How to get_template_directory() properly on local environment
- Use html inside shortcode function
- Shotcode argument issues
- Shortcode parse error – wrong syntax
- Exclude category from shortcode
- wp_nonce_field is breaking form for reasons unknown
- Visual Composer creating own shortcodes with vc_map() to return simple Image
- get_pages() Returns Only One Item
- Function shortcode – Set Parameter
- Adding an option to a shortcode
- How to use author meta in shortcode?
- Using multiple line variable inside a function?
- Testing for a shortcode using a function. 404 page throwing PHP Notice
- Use a shortcode to display custom meta box contents
- Echoing function into WordPress NextGen gallery
- Output loop to function return?