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.
Download
The plugin is availiable on WordPress Plugins Repository on this page. Sorry to all people who kindly claimed for not finding a download link.
“scrolling=no”
i want show scrolling=no
As soon as i add those attributes!
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…
Hi. I want to include a bloglog profile widget in my “about” page and I’m pretty sure it can be done with this plugin. Can you show me how I could do it?
Thanks.
Hi Pablo,
You can add any type of link using this plugin.
let say you want to add this link
http://www.naseerahmad.com/services/
just use the following code
[include file=http://www.naseerahmad.com/services]
I hope you understand this.
regards,
What if I wanted to include this:
I don’t know if you got my previous message. I wanted to know if this type of code can be included:
(((())))))
Can you please send me more details on this, in order to understand your questions?
regards,
Naseer
This doesn’t work in sidebar widgets as far as I can tell, which is where I needed to use it. Do you have any ideas on how to make it work there as well?
Your pugin works but my pages will not validate.
A tag shows up in the XHTML just in front of the
included code.
Any idea why this is happening?
When I just past the code into tinymce the problem goes away.
Hi, cool plugin, i needed it so much, thanks!
Sometimes it would be nice to have some more attribute in iframes, like allowtransparency=”true”. (Crap IE doesn’t make transparent iframe unless this is set
)
Best regards.
If you really need to use all the iframe’s attributes, why not write the iframe tag directly in the page or post? You only need to use the editor in “html” mode (an avoid to do subsequent editing in “visual” mode).