You can use set_query_var
('playlist_id', $tp_atts['id']);
.
When you later call locate_template
with $load = true
, it will call load_template
, which extract
s the query variables making them global, and accessible to the template file (in this case, as $playlist_id
).
Related Posts:
- How to customize search result page title?
- How to fix a theme with page.php Default Template that accidentally deleted?
- Add multiple custom fields to the general settings page
- When should you, and when should you not, use wp_list_pluck()?
- Display random categories on the front page (Finding and Editing Theme Functions)
- How to redirect to post if search results only returns one post
- How to override admin-bar style
- Is it possible to remove the “standard” post format?
- Woocommerce add to simple product attribute programmatically [closed]
- Issue with get_theme_mod returning a blank value instead of the saved value
- How to remove row-actions from pages table?
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- wp_get_attachment_image returns different image size
- Passing variables to templates (alternatives to globalizing variables)
- Load post with a different template?
- Modify search function in WordPress (TwentyTwelve)
- When is it appropriate to put functions on page template vs. functions.php?
- Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?
- WordPress Change Post Templates,but not drop down, but Image selection
- Removing Unnecessary Text from Admin Menu without CSS
- Set default options for inserting media
- Default or Preset Content for Custom Post Types
- Remove tag on my RSS Feed
- Display WordPress Search
- How do I change parameters without changing the core
- Problem with extract() with custom shortcode
- How to add a rel attribute to images that contains their categories?
- Using locate-template & shortcodes doesn’t appear to work
- add sidebar area to header of child theme
- Preferred Use of home_url()?
- Can I use require() function in a template file?
- How to set global variables in template page?
- Why isn’t is_page_template() adding a body class?
- Custom function for user register in wp?
- Dequeue script in template isn’t working
- Query children and parent title
- Help to resolve Syntax error, unexpected ‘endwhile’ (T_ENDWHILE) [closed]
- Adjust which tempalte a page uses with a function?
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- Theme-Config tab in admin Pannel?
- Creating loop within functions.php
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Delete pages and Create default pages for all new network sites
- Actions according to image type and size
- Make “sidebar template” the default template for new pages
- Retrieve post modified date for specific post by post ID
- Post thumbnail relative link and HTML modify
- Refactor create_function
- adding custom classes for tables
- Pass Shortcode Attribute to footer Script
- How to mass-delete inline styles in WordPress custom post type automatically?
- How would go about if I just want a temporary function?
- Remove the deleted users avatar from list
- How to call custom function from functions.php in site-wide template files?
- Customizer field value into functions.php variable
- Attach parent category template to all subcategories
- Add class or ID to any WordPress function
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- How to remove howdy dropdown menu content
- How to include local menu based on page id?
- How to create function from code?
- Set quantity of woocommerce product on page visit [closed]
- wp_dropdown_categories and custom attribute
- str_replace function in theme
- Display Password Protected external RSS in wordpress template
- How to extract the variables out from “add_shortcode” function?
- Default Gallery Edit/Template Editable?
- How to enable template page only for a post id page
- Selective Product Category for Carousel
- How to change login labels
- Automatically wrap multiple images in div
- Ajax not working properly
- Modify a function without editing template
- Retrieve tags data in post body
- is_customize_preview() like function to check if Customizer “Live Preview” in JavaScript
- Right way to update widget on dynamic new input field
- How to customly read JWPlayer’s “Playlist” items by using its “playlistid”?
- Include default functions and methods
- Hard-coding custom menu elements for menu manager
- Twentyten Child Theme: header images display messed up in admin panel
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- How can I modify all existing tags while keeping the urls themselves?
- Best practices regarding the creation of custom widgets?
- IF Statement on Button to make it complete and “uncomplete” based on user action / click
- Gravity Forms Button Text
- Find resources dynamically loading and change or add to the url
- When sale price is 0.00 show only regular price
- Unable to login using username
- Word Press – Dynamic Content [closed]
- Insert image in WordPress with HTML5 tag and caption function
- how can I just add to parent theme function(s) instead of redeclaring whole the function
- Functions For Calling Specific Elements
- Full page template function
- Move Custom Fields on General Settings Page to New Location
- Page attributes missing
- Skeleton Child Theme Add Icon Bar to Header Flex Grid
- different style sheet for just one page template
- wordpress use single ajax in place of multiple ajax requests in a smarter way
- Add Element as a Filter to the_content