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:
- Include files in functions.php
- Permanently remove first image from posts
- reason of splitting theme files to multiple files
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Design view breaking on Pages
- where to include a php file
- Use different javascript files for each page on website
- How to get custom image size for image uploaded in Customizer
- Want to create Child theme, but already edited Parent theme css files and some php files
- Can I change a variable in a content part while calling it?
- Adding code to child theme functions.php to override parent theme behaviour doesn’t work
- How should I best target dynamically served content?
- the_author() not working outside the loop
- Changing the template hierarchy
- How to Insert Shortcodes into Theme?
- Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
- Put CSS inside a PHP file and include it the right way
- Set WordPress Default Template
- Custom Theme, Custom shortcode not working
- Customizer: Output default value in Customizer CSS
- WordPress does not load page.php, return 404.php
- Adding custom directory and PHP files in wordpress
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Show full posts in archive
- WordPress add post format support not working
- Connect WordPress with SharePoint [closed]
- adding custom user input fields in WordPress admin dashboard gives error The link you followed has expired. Please try again
- Move category description below post list in blog
- WordPress Shortcodes.. printf is outputting a random number… Can’t figure out WHY?
- code is skipping a div
- 404 error when I acess the second page of post-type
- proper way to add css using functions.php?
- Correct and safe way to include php content in my page
- What does this mean in wordpress? Easy question
- Showing latest post without 301 redirect
- Translate wordpress date from Italian to English
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- WordPress Customizer Default Image
- Do I have anything to worry about when switching to a default theme to test for plugin conflictions?
- How to integrate noimage picture in this code
- php include not working in custom page
- Post’s ID pattern?
- Need oop for wordpress theme? [duplicate]
- Using WP functions such as the_title() in an included php file
- Save Custom CSS file in the upload folder dynamically?
- Warning: printf(): Too few arguments in helpers.php file
- How to include custom PHP file both in header and footer files
- WordPress and PHP Version Upgrade issue [closed]
- home.php show blog posts as grid view
- Amend theme php to include certain category in header
- Override index with a custom PHP page
- Accidentally deleted php code in WordPress website [closed]
- Include a file that has a function in it
- How can I assign separate stylesheets to different pages?
- How to make sure relative URL works when site is not on root domain?
- Is there a (offical) way for a theme to deactivate itself and show a message in admin?
- Wrap title and excerpt in a div (latest posts block)
- how to get wordpress page url php code [duplicate]
- How to put search bar & logo in the “primary navigation” storefront theme?
- Dynamically switch file in get_template_directory_uri() | Function [closed]
- I am having issue in divi woocomerce checkout module. (DIVI theme)
- Styling a category link
- remove_action from parent theme using child theme functions.php
- Commenting requires wordpress login, wordpress discussion and post comments tick boxes are checked
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Conditional Banners
- The style.php file inside theme-engine folder has other content on FTP
- How to override theme’s public static function inside of a trait?
- How to Change Site Elements based on referring URL
- how to use 2 index.php file One for mobile and one for desktop
- PHP Error in WordPress Theme
- loop to return tags in woocommerce in alphabetical order?
- 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
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- Use Custiomizer to setup meta theme color tag
- Rotating Header Images
- Custom Theme, Editor won’t wrap text (i.e. change width)
- 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
- 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
- Inserting A Feed and Sidebar into an HTML Page
- how to register a second page-template
- Gallery requires a featured image but does not show it in posts/pages
- WordPress blog set up
- Catchable fatal error in appcloud free theme by Tokokoo
- Shortcode not passing variable to included file
- How to include a php file in every post and page [duplicate]
- How to create and add js and css file when server is not on my PC?
- 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
- a problem in class in class-wp-hook.php
- Using Featured Image as Hero Background in Word Press
- Font Awesome Icons as squares [closed]