Include It is a plugin that permits the inclusion, in a post or in a page, of any type of file (even a php script that will be executed).

I use it to write some functionalities needed in some pages, without creating specific template pages (that are theme dependant) and without using a "php code executor".

The plugin has no options to set, but may be you would have some infos on how to use it. So, read on...

How to use

The plugin let you to include in a page or in a post whatever file in you web server: text, html or even php (that will be
executed!). In the examples there is a space between the first square bracket and the word "include": remove it if your are copying this pieces of code.
To include a file, write down in the post or page this "quick tag":

[ include file=filename]

where the "filename" is a relative path to the file to include. The file system path to your blog "root" is automatically added.

Example. If you write:

[ include file=license.txt]

the file "license.txt" of the WordPress distribution you are using will be included in the post or page.

Advanced usage

If you need your inclusion to be showed in a iframe, you can! Just add some attributes to the include tag, like in this
example:

[ include file=license.txt iframe=true width=90% height=300]

height and width are optional. If not set they won't be specified. The iframe "frameborder" will be set to 0 (hidden). If the
file specified starts with "http://", it will e used "as is" in the "src" attribute of the iframe. If not, the blog home url
will be added to the file.

Why to use this plugin?

If you want to use the rich text editor (TinyMCE) and you want to put in the post some special code, this way grants the
code to be inserted without modification. Or if you want to write a service (like a calculator or someting else) written in
php, you can embed such a service in a normal WordPress page, inheriting graphic, css and the overall blog environement.

3 Responses to “Include It”

  • “scrolling=no”
    i want show scrolling=no

    Chanchai on
  • As soon as i add those attributes!

    admin on
  • Hello and thanks for this plugin.

    Is it possible to include two different files in one post (for example: one before the post content, and one after the post content)?

    I couldn’t make it work on my own — the second inclusion displays as [include file =filename] –, but I’m a total newbie at code, and hopefully a more knowledgeable person knows how to do this…

    Lionel Chollet on

Leave a Reply