If you use locate_template() instead of get_template_part() you can use all variables in that script:
include(locate_template('include-modal-video.php'));
Then, <h2>00: <?php echo $video; ?></h2> will work.
Related Posts:
- Is there any way to use get_template_part() with folders?
- get_template_part for template in subdirectory not working
- Current URL path variable
- Is it possible to override the result of get_template_part()?
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- Get template part vs locate template function
- passing argument to get_template_part() or a better way to code
- Templates & CSS – Proper Programming Practice?
- TwentyTen: Overloading template.php files vs. get_template_part
- How to include template according to meta post value
- Accessing $post variable from template part
- Using Includes in Templates in Document Head
- Adding variable to get_template_part
- How to move style from template file to section?
- Unable to include a template
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Valid HTML in Template Part
- global variables in templates
- Remove portion of header code from home page only
- Use a separate template for the home page only
- How to create new template page and template-parts in wordpress theme [closed]
- Including template pages within another template?
- Why won’t the action hook wp_head accept parameters?
- Organize template parts and page templates in folders in regards of template hierarchy
- How to get all template files used for rendering a single post/page?
- Display a custom 404 page without a redirect
- How to add variables to a template
- How can I show contents of a template part inside of another page?
- Using require_once for parent-directory not working but is working in sub-directories
- When to use content-pagename.php?
- Is it possible to call a template file inside wysiwyg editor? And how?
- If I define a variable in header.php, how do I make it available to templates?
- Dynamic header and footer template inclusion: footer script not included
- How can one use variables in a template or template part without polluting the global scope?
- WordPress “Blog” template hierarchy
- Passing a variable to get_template_part
- Passing variables from header.php to template and vice verca
- Use [embed] filter in template files
- How to force TinyMCE in WordPress to replace newlines with tags and not with
- WooCommerce: Change template for single product page
- How to show a under construction page for a domain but still be able to work on index.php?
- add/apend templates ‘transparently’ via plugin to currently active theme or child theme?
- Programmatically change post templates?
- Gutenberg Editor – Template Doesn’t Match Error
- Need to give custom page template for each language in WPML
- Post formats template
- Proper way to use get_the_content() in front-page.php and the content-home.php?
- What is content.php file that is needed for Jetpack infinite scroll plugin?
- Auto-Generate Longtail-SEO Pages/URLs
- bloginfo(‘template_directory’) img src
- Should template files be copied to the child theme for editing?
- Include a specific page in your template
- Calling an image within the theme folder from inside a post/page?
- Best Constant to use to check if WordPress is running
- WordPress automatically created files like .theme-name / .plugin-name.php [closed]
- Why does the Full-width Template in Twenty Twelve pack so many classes into the body class attribute?
- How to support custom templates on a custom post type?
- How to use $wpdb (from the template) to update the DB, without being an admin
- Page attributes missing
- How to put limit on slider
- What are the main parts of a WordPress Template?
- Page template option missing
- Trying to create a template without navigation and footer
- Genesis – Adding custom hooks to display secondary navigation
- Force WordPress to NOT display the manual excerpt
- Easiest way to map content (in json) to the view (template)?
- Removing calls to noindex() and wp_no_robots()
- Query the database after get_header() has been included
- Does wp_mail work in frontend tempate file?
- Dynamically generated URL and Content page
- Custom /Page/2/ Template Only
- wordpress – modifying template to show more posts
- How to insert “get_template_part()” based on Category ID?
- How can I include ALL post types in the_post_navigation() links, not just current post type?
- Template includes
- Adding a second loop breaks everything
- Two different single.php depending on source page
- Attachment URL for an image is loading direct image file
- Fixing media query
- I’ve installed example data on Nominee template but the published site shows another version of the site
- Displaying all posts of a category in full view on one page using their single.php template
- why does not showing my custom post category list in any template?
- Locating the HTML piece of code in wordpress
- Custom Template doesn’t output result when set as homepage
- Single page applications with WordPress: routes and templates
- Inserting javascript file into theme template?
- Creating custom post-listing templates in twentyseventeen child theme
- Display different list of “Custom Templates” for each Custom Page Type
- Create a variable with string, array or multiple values
- Use another theme template in my theme
- Submit form to another template (ugly url)
- Using file outside of template hierarchy for Twitter sign in authentication
- Page Templates Used in Custom Post Type
- How to set global variable in functions.php
- load_textdomain won’t load my .mo file
- How do I access variables outside a function [closed]
- files disappearing from template
- why does blog page ignore template [closed]
- Display A Post At A URL without Redirecting
- wp:shortcode works in block theme template file but not PHP include file