I'm developing a plugin that creates pages for admin menu in backend via WPBakery. But when I look at generated page there is only shortcodes. How can I make plugins shortcodes execute in backend.
I've tried to use echo do_shortcode( '$content' ) but it does not work. I probably should work with plugins classes but do not know how.
I want to make a page with page builder for admin menu and execute all shortcodes that creates rows columns message boxes etc.
Any help would be appreciated.
Before using do_shortcode, add WPBMap::addAllMappedShortcodes(); function, this function loads all elements, and then do_shortcode should work fine.
Related
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.
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.
I use the tinymce editor for creating comments and I need to make it available to users outside of the admin zone.
How do you do that without a plugin ?
I've tried every available plugin but they either don't work without breaking the javascript (ajax) or do not work at all.Thank you.
Edit : I installed the "Ajaxed Comments" plugin and got it to work by having it reload the whole page after the content has been submitted.
I am now trying to implement the wp_editor function either with jquery or PHP, without any success so far.
I am creating simple plugin, and I prepared few pages: add.php, edit.php, delete.php and list.php. I've used add_menu_page and add_submenu_page - so I understand why they are visible in admin menu. How to create page (or custom URL with parameter) without putting this into menu? I'd like to add link to edit page and delete url (code executed by plugin) on listing page - something like in posts listing page but can't find function to achieve this.
Here are two possible solutions for this questions:
How do you add a WordPress admin page without adding it to the menu?
Personally i havent tried it but it like the one where you remove the item from the menu after you set things up like normal.
There is also a great plugin called the WP Router that can help you setup totally unique urls with the callback you desire.
I'm somewhat new to Wordpress. I'm primarily a front-end web designer, and I use Wordpress plugins for things like dynamic content, forms and really anything a client requests that I do not know how to write code for. Unfortunately, I share the frustration of many designers/developers who complain about Wordpress' html sanitization. Thus, I write the majority of my html directly onto the page templates rather than using the Wordpress editor. I only use the Wordpress editor for small sections of my pages where I need to insert a plugin shortcode -- for a form or something. This works well until I need to use multiple plugins on one page. For instance, if I need a form plugin at the top of a page and a google map at the bottom, then I have to code all of the html in between those two elements into the Wordpress editor, which I would rather avoid.
My question -- is there a way to use Wordpress plugins in the page template html instead of using the shortcodes in the Wordpress editor? If I had it my way I'd never have to use the Wordpress editor for non-blog content.
Thanks,
Scott
Use wordpress do_shortcode();
e.g. echo do_shortcode('[gallery autoplay=no]');