Iframe implementation for Wordpress - wordpress

Does anyone know a way to implement an iframe on a WordPress website. Every time I place the code onto the correct page, wordpress strips my code and the iframe breaks.
I was wondering if there was a plugin that allows iframe code to stay intact or if there is some form of shortcode to use.
I have tried:
[iframe url="http://www.youtube.com/embed/X3kLPtVjjhA" width="579" height="360"]
[fixiframe url="http://www.youtube.com/embed/X3kLPtVjjhA" width="579" height="360"]
and installed the "embed iframe" plug-in on my site but none of them seem to work.
I appreciate the help.

You don't need an iframe to post a youtube video, but to answer your questions about iframes in wordpess..
I am not sure what those plugins do. You can create page templates and have iframes in your pages without using any plugins.
Create a new page template and add the iframe in the php code for that page template. More specifically, create a copy of page.php and rename it. In the comments at the beginning of the file, edit the line with the template file name to Template Name: MyPage. Edit the page code and add iframe code where you need it. And select this template (MyPage) as the template for your page in page edit section wp-admin.
You can also add the embed code as meta information to page in wp-admin, and fetch this meta information in the code to display the iframe. In this way, you can use different iframes for different pages with a single template.
Let me know if you need help with this. I will post a complete solution

Why are you using an iframe to load a Youtube video, you should use the embed tag that they show under the video...
I have iframes in my wordpress for all the Facebook/twitter buttons and they work great!

Related

Embedding a live chart from an external page into Wordpress post

My wordpress site has a blog on the homepage, e.g. www.myblog.com.
I made a web app in Flask (a Python web development framework) which has the url www.myblog.com:8000/chart1
I want to show this within a post on my homepage/blog. If this is possible how can I do this?
An iframe should work. WordPress strips iframes out of the post editor, but you could either hardcode the <iframe src="www.myblog.com:8000/chart1"></iframe> HTML into a specific post type or something. I think a simpler option would be just to use a plugin like Iframe Shortcode:
Iframe Shortcode
Install/activate that and it'll give you an option to insert a shortcode into your post content.

Change the content of a page from a wordpress plugin

I am creating a payment gateway for woocommerce and it works great.
Now I need to change the content of the thank you page so I think that is better to create one of my own.
I have a folder with the page that I want to show inside my plugins under a "templates" folder, si my idea is to show that one.
I still not able to show the content of that website. Any ideas on how to do this ? I would be really greatful.
At the end, the best solution was to have functions / shortcodes that do some stuff before loading the pages and then redirecting to the pages.
At least this worked for my plugin.
http://wordpress.org/plugins/webpay-woocommerce-plugin/
Any way, if you want to change the content, you could add a website through the plugin calling the following methods.
get_header();
get_footer();
With those 2 functions I could call everything that I needed to create my website page withing my plugin.

How do I call a plugin in a custom page for wordpress?

So I am trying to do this and I don't know how. I have a wordpress powered website with a plugin called "frontier-post" in it. This plugin makes a new front-end post submission. The way to use it is to put the shortcode "[frontier-post]" in any post in my wordpress page and that page turns into this.
I want to make a custom page for myself, where I can have the content created by this plugin there too. So I do not want it to be a post in my wordpress, but lets say at a corner in the custom page. I have searched and found these but the suggestions there would not work. I am able to include the wordpress so that the custom page has access to posts, etc. but even using this
echo do_shortcode('[frontier-post]');
would not help me. (even if header is included)
These are the similar things i found:
Wordpress/PHP - How to use plugins outside wordpress-powered pages?
Need Help for my Custom Page Template
I would really appreciate it if you could help me with this.
If you are creating a PHP page that isn't going to be rendered inside WordPress, you can't use a Plugin of the WordPress engine to accomplish what you are wanting to build. (As the accepted answer to one of the pages you link to indicates).
Instead, you might be able to use the json-api plugin and have your custom page query it for the data. While it won't render the shortcode, it will give you the raw data to work with.
http://wordpress.org/plugins/json-api/
Edit:
Based on a comment, your do_shortcode should work...just try it without the square brackets.

Add HTML Snippet to Wordpress Blog Page?

I have recently started working with Wordpress, and I use the HTML Snippets plug-in to fill in the contents of each page. This works well until I hit the blog page. My blog page does not take anything from the page editor, so I can neither paste code snippets nor write anything in the WP page editor field. It only responds to posts. As a result, I am unable to add anything static to my blog page. Also, editing the template post_list file also leads to damaging the template.
How do I go about adding static elements to my blog page?
Essentially it sounds like you're wanting to add a page template to your theme, which you can then assign as your 'Posts' page through the Wordpress admin.
The question itself is rather too broad to answer without an attempt at coding it yourself, but you can read more about it on the codex: http://codex.wordpress.org/Page_Templates#Creating_a_Page_Template

Wordpress proper way of adding pages

I have been trying to figure this out now for a while but there but I haven't found any conclusive answer yet. I want to add some pages to wordpress that are static. I need to include JS script that is from a third-party login. Using JS, HTML, CSS. Very simple and basis login.
So normally what I do is create a page, empty, attach a template and put the JS/HTML/CSS/Text into that template.
However, it seems weird to create an empty page in a CMS. Is there another way, a proper way, of adding a normal page into wordpress without using the static PAGES option in the CMS?
You could just create the page and add a link to it from your WP-site. But this is only if you don't need any of the wp-functions. Also it won't show up at all in your wp-admin dashboard.

Resources