How to restrict a plugin from certain pages without editing its core

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

navigation among single posts

I cannot think of any one plugin or theme that would handle that exactly; but you could disable the previous/next post links and try rather to display other posts in the sidebar with similar post_types / categories. This plugin has many options to display easily in a widget area: WP Category Posts List http://wordpress.org/extend/plugins/wp-category-posts-list/ This … Read more

Apply html elements in php statement

Do this instead: add_post_meta($newpostid, ‘name’, $formdata[‘your-first-name’] . ‘ ‘ . $formdata[‘your-last-name’]); This uses PHP string concatenation to add a space; the echo isn’t necessary in in this instance because WP will do it itself, later. You probably can’t force a non-breaking space there, either, since WP will escape all its output.

Facebook and Twitter share buttons not working [closed]

There is a jQuery event hooked to that link. Here is the function that is called whenever you click one of the sharing links: function (){ window.open( jQuery(this).attr( ‘href’ ), ‘wpcomtwitter’, ‘menubar=1,resizable=1,width=600,height=350’ ); return false; } This is added by the JetPack plugin and will attempt to open a dialog window with the url http://karba.la/?share=twitter&nb=1 … Read more