Using the domain name in the path won’t work; you’re not trying to specify a URL, but a path to a file, be it relative or not. Using
include(ABSPATH . '../includes/header.php' )
should work.
/includes/header.php
doesn’t work because the location of the blog
folder doesn’t is not the root folder (/
), but most likely a few levels down.
Related Posts:
- Include WP_Query in my own PHP file?
- Include a external PHP file into a WordPress Custom Template
- Include files in functions.php
- load/require specific php files for specific pages/templates/post types
- ob_get_clean returns empty string, ob_get_flush outputs string
- where to include a php file
- 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
- How do I use the Simple HTML DOM Parser in plugin when other plugin already uses it?
- Put CSS inside a PHP file and include it the right way
- functions.php is being included twice, creating PHP fatal errors
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- PHP help get_template_directory + PHP include
- code is skipping a div
- Why does abstracting html from plugin code result in loss of access to wordpress functions?
- PHP include is only working in certain places in my custom WP theme
- Correct and safe way to include php content in my page
- What is the proper way to include a PHP framework into my theme?
- php include not working in custom page
- Post’s ID pattern?
- Using WP functions such as the_title() in an included php file
- What’s the best way to include PHP code in pages?
- How to include custom PHP file both in header and footer files
- Include a file that has a function in it
- How do I call an external php non WordPress class into functions.php?
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Before & After Content – After Content directly below Before Content when using require_once
- loading a php file to a specific page id
- How do I fetch a data from an external database into my wordpress homepage
- How do I fetch a data from an external database into my wordpress homepage
- PHP get_category() function redeclared
- Include a php file that is above WP installation hierarchically?
- How can I include a file related to blog URL? Nothing seems to work
- WordPress blog set up
- Shortcode not passing variable to included file
- php “use” not working in template [closed]
- How to include a php file in every post and page [duplicate]
- Shortcode to include PHP file, pass various parameters to include?
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file
- Should I use include(_once) or require(_once) for loading php-file with customizer settings?
- Sending the reset password link programatically
- How to change upload directory in wp_handle_upload
- Only show div on homepage/blog index in wordpress/php
- Calculate percentage of post by category
- the_title() & the_content() are retrieving Post details inside a Page, after calling a shortcode
- register_rest_route regex option for base64 or alternate
- PHP syntax error when using wpdb update?
- Select dropdown not showing selected value php
- Woocommerce – How to get products which have a sale between 20% to 40%? [closed]
- Can is_page() be combined with a switch control structure?
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- Run a filter when a walker runs
- WordPress (3.9.1) MultiSite Permissions. Is chown the answer?
- have_posts() execution failure
- Can’t search posts using WP_QUERY inside AJAX Function
- Display fields as values in array from external SQL DB
- my posts are saved as drafts
- How can I remove a function that has been added to wordpress with add_filter?
- Create a range slider to change font-size with different screens sizes in wordpress customizer api
- do search in two site and show the result in first site
- Adding Taxonomy Image to taxonomy loop [closed]
- How to get private property in parent class into extended class?
- Error Uncaught ArgumentCountError i cant find it
- Loop stopped working
- How does WordPress differentiate what scripts are loaded in wp_head() and wp_footer()?
- Flexslider won’t work on WordPress
- Unable to Find Space in Custom Function
- Simple WordPress endpoint route doesn’t work
- HTML dropdown setting not showing last saved value in the database
- How do I make this Metabox show current DB value?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Unable to Call More than One Meta Box Output
- Most viewed posts in WordPress
- Is there a (offical) way for a theme to deactivate itself and show a message in admin?
- Trying to load category thumbnails on wordpress page
- Displaying a List of Changes / Updates on the Website Publicly
- Dropdown category field inside repeatable metabox
- How to extend SelectControl with data from my theme
- Retrieve alt text by referencing the img src
- How to add Text before my Custom Term and hide it when empty
- var_dump() and print_r() display null in php
- Delete post meta by serialized meta value
- How to get a post’s attached media (audio) ID and insert it into rtmedia shortcode
- Create a temporal post
- how to call other plugins once custom post has been inserted
- Are WordPress widgets cached?
- Modify arguments for parent theme’s `wp_register_style` via child theme
- WordPress Rewrite Issue
- Fatal error: Call to a member function get_results() on a non-object in on line 26
- How to create categories out of a list of words?
- Is there a way of displaying related posts from lowest hyrachical order (lowest child category to parent category)
- Difference between php memory limit and wp memory limit?
- REST API custom endpoints for metaboxes
- generate excerpt from the part of big text dump that contains keyword
- How to sort search result by post_title, then by post_content
- Custom Admin Menu Report for Specific User ID