Multiple level shortcodes

Try passing the content of each shortcode through apply_filters( ‘the_content’, $content ); – you may not be getting your shortcode output because it’s never being called in the first place (beyond the top level). the_content filter include do_shortcode() (from memory), which is what you need. See how it goes…

Any way to edit/crop my featured image upon uploading?

This can be achieved by either creating an image size using <?php add_image_size( ‘my-image-size’, 1000, 400, true ); ?> or you can implement the Aqua Resizer to your theme/plugin. Aqua Resizer works almost in the same fashion as the good old TimThumb, but instead saves the image as a correct image size in WordPress using … Read more

Plugin’s required JS not being inserted in my theme

Hey by using enqueue script to add all js and css file wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); Example here /** * Proper way to enqueue scripts and styles */ function theme_name_scripts() { wp_enqueue_style( ‘style-name’, get_stylesheet_uri() ); wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘theme_name_scripts’ ) i am sure … Read more

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