Filters on the_content with plugins, pages and shortcode
I found an alternative solution, I had just to use a new template with the loop to avoid this problem witha loop in shortcodes and everything works well for now.
I found an alternative solution, I had just to use a new template with the loop to avoid this problem witha loop in shortcodes and everything works well for now.
You can use wp_insert_post for creating the page. <?php $content=”<Sign up form content>”; wp_insert_post(array( ‘post_title’ => ‘My page’, ‘post_content’ => $content, ‘post_type’ => ‘page’, //VERY IMPORTANT ‘post_status’ => ‘publish/draft’ )); Check it.
A widget is a PHP object that echoes string data to STDOUT when its widget() method is called. — WordPress Widgets API To create the widget you have to extend the WP_Widget class with your widget class. You use the class name in the register_widget function. class Foo_Widget extends WP_Widget { //Class methods here } … Read more
I do not know of a way and I dont think thats possible, but why not just use a wordpress gallery that gives you the option to have captions below the images?
This behavior is being caused most likely because something in the shortcode function that is causing unstable behavior. I recently just had the same issue with something I was working on. From the WordPress Codex for “Add ShortCode” there’s a note tucked down near the bottom of the page: Note that the function called by … Read more
You do it like in your first example // Shortcodes.php file function myplugin_shortcode( $atts ) { if ( !empty ($atts) ) { foreach ( $atts as $key => &$val ) { $val = html_entity_decode($val); } } myplugin_display_items( $atts ); } // Register shortcodes add_shortcode( ‘output-items’, ‘myplugin_shortcode’);
If that’s the case you are going about it the wrong way. You should use WP_Ajax_Response to send the comment, or just redirect the the same page. Duplicate content is not what WP is intended for.
Forgot about this post. Worked it out, just add a page_template filter as well as a single_template filter. I hope this helps someone else! Cheers!
This is true to a degree. They probably do this for a few reasons but most likely to help monitor bugs and things like that in regards to future improvements and updates. Nothing malicious to worry about! They need to keep track of versioning especially so that you can be notified of updates to WordPress … Read more
I would approach as follows: Identify all the action/filter hooks in the plugin Identify all scripts/styles being enqueued. Create a function that removes the actions/filters based on the page using remove_action, remove_filter, wp_deregister_style, wp_deregister_script You could use something like the following: function foo_disable_plugin(){ if(is_page(‘PAGE_TITLE OR ID’)){ remove_filter(‘the_content’, ‘PLUGIN_FILTER_NAME’); remove_action(‘wp_head’, ‘PLUGIN_ACTION_NAME’); wp_deregister_script(‘PLUGIN_SCRIPT_NAME’); } } add_action(‘template_redirect’, ‘foo_disable_plugin’, … Read more