How to pass multiple custom fields as shortcode’s parameters

You can do this several different ways. Need to know how you are passing the 1 custom field in your current shortcode. It seems like you might be doing it like this: [your_short_code price=”how_are_you_setting_this”] if this is the case then you can just add more attributes like this: [your_short_code price=”how_are_you_setting_this” next_field=”set_this_field”] // From your code … Read more

WP Posts-pages text hiding does not work

The first thing I see wrong is your first “If” statement. It wrapps everything, including your “return” statement. Assuming the rest works, you might try this: function hide_replace_register( $content ) { if (!is_user_logged_in()) { $updated_content = explode(“<!–hide–>”, $content); $updated_content = explode(“&lt;!–hide–&gt;”, $content); $updated_content = explode(“&lt;!&#8211;hide&#8211;>”, $content); $ucontent = $updated_content[0]; if ($ucontent !== $content) { $ucontent … Read more

Use action, filter, or hook to append HTML to WordPress plugin function

The do_action calls allow you to add an add_action that will run at that point int he code. Based on the code you provided, you can add a new row using the mpp_user_profile_form action, like: add_action( ‘mpp_user_profile_form’, function( $user_id ) { ?> <tr> <p class=”appended-text”> <strong>Note: optimum image size is 200 pixels wide by 200 … Read more

Call function with button and return response

Based on the limited detail of your question something as per the following is a rough gist of what you could do. In your theme functions.php file: <?php function handle_request () { if (isset($_GET[‘custom_id’]) && isset($_GET[‘custom_id_nonce’]) ) { if ( wp_verify_nonce($_GET[‘custom_id_nonce’], ‘custom_id_action’) ) { $id = $_GET[‘custom_id’]; // FIRST // do something with $id // … Read more