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
- Include WP_Query in my own PHP file?
- Include a external PHP file into a WordPress Custom Template
- Include files in functions.php
- Displaying a WooCommerce product via PHP
- Check if a menu is empty?
- Get the php template file from other theme folder
- WordPress Template Engine?
- wp_remote_get returns an error for valid URL
- Blank on static home page?
- Adjust the results quantity for Search Results page pagination
- Exclude pages with certain template from wp_list_pages
- where to include a php file
- Categories Template Assistance
- Unable to set right time in admin and frontend template
- Switching between custom templates in a post type of the admin menu
- Use template for posts with a particular category grandparent
- Can I change a variable in a content part while calling it?
- the_author() not working outside the loop
- Placing the_content inside shortcode not working
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- Put CSS inside a PHP file and include it the right way
- Automatically add custom CSS to new posts using a category template
- How can I load a PHP page without using a Template?
- how could I load a different template part by page
- creating a second image attachment template?
- Get and insert order email address to the PHP template inside HTML text
- How to show single category archive
- Issues getting PHP to display in category pages
- Secondary navigation menu on one page
- Woocommerce Show Single Product on Homepage
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Does wordpress templates always in files or in database?
- Using same variable names in files added with get_template_part()
- Correct and safe way to include php content in my page
- 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?
- 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?
- Using WP functions such as the_title() in an included php file
- Removing WordPress Footer -without access to PHP code?
- Adding conditional text to a PHP Shortcode Template
- Create page template via functions.php?
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- How to include custom PHP file both in header and footer files
- add_filter function concatenate string and locate_template function
- Template Loop – add switch case php
- Post repeated when opening in overlay, how do I solve this? [closed]
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Splitting the_content() by size?
- Gravity Forms merge tags in templates?
- Unable to render custom field after attempt to generate a list of recent post in page template
- php loading different structure than source code
- Include a file that has a function in it
- pass html code to worpdress
- Getting a WordPress tag to print inside of a traditional php echo
- Loading Elementor templates in a Bootstrap modal on button clicking
- Require()/Include() post template adding extra content
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- How to hardcode header and footer in WP?
- What are the advantages/disadvantages of ways to use php template files?
- Change the “Show All” button in a WordPress Portfolio Filter
- Check if current post in loop is last on current page
- Roots Sage Symfony error when using override from template
- If is_page elseif is_page not working like I want it to
- How to display last whole post on the homepage
- loading a php file to a specific page id
- missing admin bar and widget in a template
- How do I fetch a data from an external database into my wordpress homepage
- My own theme’s custom widget areas are not working
- Add point on excerpt post
- WooCommerce – Print Processing orders [closed]
- Loop returns more items than exist?
- How to call a certain object/menubar in a PHP file
- How do I / Is it possible to execute an external PHP file / function inside WordPress?
- How can I include a file related to blog URL? Nothing seems to work
- why is this content-template not showing any of my blog-entries?
- how to register a second page-template
- PHP code rendered in HTML
- WordPress blog set up
- If I define a variable in header.php, how do I make it available to templates?
- Shortcode not passing variable to included file
- How to include a php file in every post and page [duplicate]
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file
- Loop on a wordpress Page instead of content coming from the WP text editor
- Should I use include(_once) or require(_once) for loading php-file with customizer settings?
- How can one use variables in a template or template part without polluting the global scope?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)