Working plugin code breaks admin

Not sure if this is the actual answer for this but on line 252 of the pastebin link change: <form action=”‘.site_url().’/wp-admin/admin.php/options-general.php” method=”get”> to <form action=”‘.admin_url(‘options-general.php’).'” method=”get”> When I submitted the form in the settings it giving me a not found error.

How set role at registration based on email?

Here is a snippet that assign author role to a new registered member whose email is [email protected] where you need to modify to fit your needs: add_action( ‘user_register’, ‘user_register_cb’, 10, 1 ); function user_register_cb( $user_id ){ $user_info = get_userdata( $user_id ); $email = $user_info->user_email; $domain = ‘.co.uk’; $pos = strpos( $email, $domain ); if( $pos … Read more

Plugin program: JQuery not working in this plugin

Firstly I’d suggest wrapping your JS like this: (function ($) { $(document).ready(function(){ $(“#Yes”).click(function(){ $(“.apptype”).show(); $(“.specify”).hide(); }); $(“#No”).click(function(){ $(“.specify”).show(); $(“.apptype”).hide(); }); }); })(jQuery); You’re also enqueuing jQuery twice, and the above the above script twice…. and with your shortcode you don’t need to declare the DOCTYPE, or wrap your from in an HTML tag. I would … Read more

Theme styling for plugins

Your two options are to add your own stylesheet to redefine the plugin’s styles, or remove the plugin’s css file entirely by dequeueing the stylesheet (assuming the plugin has correctly added the stylesheet via the API) function wpd_my_theme_css() { // dequeue plugin css with same handle it is enqueued with wp_dequeue_style( ‘plugin_css_handle’ ); } // … Read more