Hello CandyPaintedRIMS,
Please try get_template_part() function to include any file into your custom template.
Your code:
<?php include('header-bar.php'); ?>
It should be replaced with:
<?php get_template_part( 'header-bar' ); // include header-bar.php ?>
Hope this will helps you.
Thank you
Related Posts:
- code is skipping a div
- php “use” not working in template [closed]
- To close or not to close php
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Include WP_Query in my own PHP file?
- Why do templates contain so many PHP tag pairs?
- Include a external PHP file into a WordPress Custom Template
- Include files in functions.php
- Is there a way to parse shortcodes in PHP?
- Displaying a WooCommerce product via PHP
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- load/require specific php files for specific pages/templates/post types
- WordPress Template Engine?
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- ob_get_clean returns empty string, ob_get_flush outputs string
- wp_remote_get returns an error for valid URL
- On this day PHP code
- How to loop over custom fields in a page template?
- Blank on static home page?
- WordPress theme & site not loading after moving files
- Adjust the results quantity for Search Results page pagination
- Exclude pages with certain template from wp_list_pages
- where to include a php file
- Use Timber/Twig to pull an image by image ID [closed]
- Categories Template Assistance
- Is it possible to use the featured image of a page as a css background without inlining?
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- Include Class File in WordPress
- nowplaying.include.php Will Not Display Results
- integrating external php library into wordpress- the right way
- Change title and meta description in included page (not template)
- Can I change a variable in a content part while calling it?
- the_author() not working outside the loop
- Blank space at beginning of tag?
- Placing the_content inside shortcode not working
- Link to file in plugin directory from wordpress template?
- Password protecting content in custom template
- How to override wp-admin styling
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- Put CSS inside a PHP file and include it the right way
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- Automatically add custom CSS to new posts using a category template
- Render ninja form inside markup
- How can I load a PHP page without using a Template?
- functions.php is being included twice, creating PHP fatal errors
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- how could I load a different template part by page
- PHP help get_template_directory + PHP include
- creating a second image attachment template?
- Mass update excerpt
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Get and insert order email address to the PHP template inside HTML text
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show single category archive
- Issues getting PHP to display in category pages
- Change title only in dynamic page
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- How can I edit the content in index.php? [duplicate]
- Woocommerce Show Single Product on Homepage
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- how to show only specific category for a template
- Why does abstracting html from plugin code result in loss of access to wordpress functions?
- Show a different code on front page to other pages
- Does wordpress templates always in files or in database?
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- Use WordPress function in php file
- Correct and safe way to include php content in my page
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- Add filter multiple times using only one master function
- Create a Blog Template Page
- Showing latest post without 301 redirect
- WordPress template page name displayed on screen
- Is there a way to hook or call a custom woocomerce template that is not part of the default templates of woocommerce?
- What is the proper way to include a PHP framework into my theme?
- single.php with different look by category
- How to call multiple functions from multiple files into a WordPress page template [closed]
- php include not working in custom page
- Post’s ID pattern?
- How do I define a lookup table that will work across all PHP elements of the template?
- persist a variable set in header.php all the way down to footer.php
- Using WP functions such as the_title() in an included php file
- What’s the best way to include PHP code in pages?