Change the content of a page from a wordpress plugin - wordpress

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.

Related

Load a website within wordpress plugin

I developed a plugin that needs to show some information at the end, and for that purpose I have a template inside my plugin.
Which one is the proper way to call all wordpress headers for the html to render properly ?
Ok, I already figure this up. At the end I just called the core wordpress components as it was a template, and change the content to what I wanted.
get_header();
get_footer();
With those 2 functions I could call everything that I needed to create my website withing my plugin.

wp e-commerce product single page not working

I am using wp e-commerce plugin & also used gold cart plugin for more functionality but my product inner page not working.
There is use in grid view of products and files from plugin where being put in my own theme.
I put my wp e-commerce plugin > wpsc-components > theme-engine-v1 > templates files in my theme but it still not working. Can any one having idea about this? so please help me.
page url:-
http://www.eddingtonhousenursery.co.uk/wordpress/products-page/perennials/achillea-terracotta/
It seems you template file is not in the right place.
Please make sure you have moved all the plugin template files in the theme.
Best way to debug is print a string and die. Now check if your printed string appears on the page.

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.

Iframe implementation for 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!

Wordpress Not Publishing Posts To Custom Template

I am building a theme that has a lot of custom templates, like every page. Ridiculous, but for some reason the template I made for the "postings" page is not getting the posts? I have set the post page in reading preferences, and I have set the page to use my template, but it still publishes posts to a default template. Of all the customization I built into this I did not expect the blog part to give me trouble! lol Anyone run into this kind of thing?
Thank you.
The way I usually to it is to have standard setting in reading preferences.
Build my front-page in index.php
Build a template for blog posts
Add a page and assign the blog post template
Of course you then have a kind of placeholder page sitting amongst the other pages, don't really like that. But it works.

Resources