Purpose
Include_HTML is a WordPress plugin that can be used to include freeform HTML (or JavaScript, or plain text) from any HTTP-accessible source. Needless to say, this HTML may be static or generated dynamically by any sort of script or program.
Download
(Versions listed most recent first)
- Version 0.4 (tested with WordPress 2.9; release note)
- Version 0.3 (tested with WordPress 2.7 and 2.8; release note)
- Version 0.2 (tested with WordPress 2.7; release note)
- Version 0.1 (tested with WordPress 2.3.3, found to have issues with 2.7; release note)
Installation
- Download and unzip the appropriate version file.
- Create an include-html directory on your WordPress server under wp-content/plugins.
- Put include-html.php into that directory.
- Activate the plugin using WordPress’ administrative interface.
Usage
To include a remote file or output of a remote script, use:
[include_HTML: http://mysite.com/myfile]
Since version 0.3, an alternative is available. You can specify an absolute local URL starting with a forward slash to include local HTML or output of a local script (can be handy if you want this to work through a domain name change):
[include_HTML: /myfile]
Note that regardless of how you specify the URL, it is output, not code, that will be included. This means that the script whose output is included will be absolutely unaware of WordPress and its internal objects, unless you expressly write it to be aware of them by including the appropriate WordPress core files.
Pingback: How to learn where your YouTube viewers stop watching your videos, when they start, where they come from, and more.
Pingback: The Complete Guide To Setting Up Your Webseries Webpage, Part 2
Great plug-in that gets me around some WP limitations. One puzzle I’ve been unable to solve is is the font size setting. I have three pages in my WP blog (URL above) that are called by the plug-in. The font size there is larger than on other pages or posts. Those three pages are FAQ, GMT, and LINKS, and the HTML for those pages is in the same folder as WP. Any ideas why I can’t seem to set the font size?
Dan,
Take a look at HTML you’re including. The beginning of every paragraph looks like this:
<p><font color="#D2E8FF" size="2" face="Arial">
If you want your included HTML to look like HTML produced by WordPress, remove the unnecessary formatting. Also, it might be a good idea to strip <html>, <head>, and <body> tags out of HTML you include…
thank you very much for creating this!!