OK. I’m assuming you have WordPress setup as a sub-directory of your root URL. If so, this should work:
<?php include 'http://www.site.com/file.php'; ?>
Sometimes people write the include special form with parentheses. In most cases it won’t break anything, but if your code looks like this, try removing them:
<?php include('http://www.site.com/file.php'); ?>
Also, make sure that the “WordPress Address” and “Site Address” are both set to the proper URL in the admin settings. This might throw off your absolute URL.
Related Posts:
- WordPress Theme variables scope
- Include WP_Query in my own PHP file?
- esc_attr() right way and use
- Include a external PHP file into a WordPress Custom Template
- why is translation not working on theme?
- Include files in functions.php
- Is having multiple theme customizers for different pages possible?
- How to export/import theme customizer settings?
- Check php version before theme activation
- Separate WordPress themes for each category page
- load/require specific php files for specific pages/templates/post types
- Detection of theme being used
- Permanently remove first image from posts
- reason of splitting theme files to multiple files
- How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?
- How to get the registered sidebar’s name by its id?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- ob_get_clean returns empty string, ob_get_flush outputs string
- One button to change all settings in theme customizer?
- Replacing mysql_real_escape_string in WordPress theme
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Activate different theme for temporary preview
- Nice scroll to wordpress
- Twitter feed is showing blank in WP site [closed]
- Design view breaking on Pages
- Can’t Find a Way to Edit the Home Page Content [closed]
- where to include a php file
- How do I hardcode a WordPress shortcode into my theme?
- Use different javascript files for each page on website
- Fatal error: Call to undefined function wpsc_cart_item_count()
- How to get custom image size for image uploaded in Customizer
- Passing array in add_option()
- Widgets not showing in my custom theme
- Want to create Child theme, but already edited Parent theme css files and some php files
- Include Class File in WordPress
- nowplaying.include.php Will Not Display Results
- 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
- need to edit php file of child theme to remove an element
- style.min.css code issue
- Beginner Developing Theme with Bootstrap – NavMenu question
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Local WordPress from Git repo, where to set document root?
- user update profile for custom code
- PHP get_category() function redeclared
- Use Custiomizer to setup meta theme color tag
- Rotating Header Images
- Custom Theme, Editor won’t wrap text (i.e. change width)
- Create a custom theme-specific page, invisible in the admin-panel?
- Editing existing pre-created menus in PHP
- Two theme locations for two menus, but only one is showing up
- Editted Theme Files Get Updated/Reverted Every So Often
- WordPress pagination broken on blog page, working for search results page
- two wordpress sites, two themes, one database, same content
- calling a function from a class in your template
- Showing custom field contents without listing description
- Hide cart when empty [closed]
- WP Knowledge Base Theme bug – Subcategories and Articles, Need to change WP_Query
- Shortcode Display From WordPress Dashboard Page Without Using post_id
- How do I / Is it possible to execute an external PHP file / function inside WordPress?
- Image not displayed
- How can I include a file related to blog URL? Nothing seems to work
- Inserting A Feed and Sidebar into an HTML Page
- Using existing widget code! [closed]
- how to register a second page-template
- Gallery requires a featured image but does not show it in posts/pages
- WordPress Website Featured Image Replacement Issue
- WordPress blog set up
- doubled content
- Themes with variable width or single columns? I want to display source code
- .htaccess on multisite and roots theme?
- Move wordpress sidebar on homepage up to new position
- How can I print out a single stylesheet or javascript link?
- Catchable fatal error in appcloud free theme by Tokokoo
- 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]
- Errors while Loading Most Recent Version of jQuery
- WordPress menu links with images & class selection
- How to create and add js and css file when server is not on my PC?
- Shortcode to include PHP file, pass various parameters to include?
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file
- Link a lightbox thumbnail to a post instead of opening the lightbox
- Predefine Magazine Style Layouts
- How to remove the intro animation which appears during the load up of some WordPress themes? [closed]
- How to store the_post_thumbnail() value in a variable
- Need help with Deprecated: Non-static error when update PHP 7.4 -> 8.1 with Dyad 2 theme
- Should I use include(_once) or require(_once) for loading php-file with customizer settings?
- a problem in class in class-wp-hook.php
- Using Featured Image as Hero Background in Word Press
- Font Awesome Icons as squares [closed]
- Gulp dev environment set up for WordPress theme development
- What is considered good practice for registering menu locations?
- WordPress theme requires PHP v >=8.1 – How to a dd different PHP version to docker-composer
- The theme doesn’t load css and JS files doesn’t load in functions.php
- Updated theme conflicts with updated php version
- Upgraded php & wordpress but theme broke
- Woocommerce Select Option Popup [closed]
- WordPress generating Undefined Variable warning