Reload page with a different shortcode when a user selects from a dropdown

You can create a custom shortcode wrapper that will execute the shortcode with the desired attributes, so you would use [jobs-custom] in the page: add_shortcode(‘jobs-custom’, ‘custom_jobs_shortcode’); function custom_jobs_shortcode($atts) { if (is_user_logged_in()) { $per_page = get_user_meta(get_current_user_id(), ‘jobs-per-page’, true); } if (!isset($per_page) || !$per_page) { if (isset($_COOKIE[‘jobs-per-page’])) {$per_page = $_COOKIE[‘jobs-per-page’];} else {$per_page = 10;} } return do_shortcode(‘[jobs … Read more

How to insert a short code into Contact Form 7 in WordPress that will call a function once the submit button is pressed

You can achieve it by changing the action of the particular form and then use the function to store the data in the database into a new file. add_filter(‘wpcf7_form_action_url’, ‘wpcf7_custom_form_action_url’); function wpcf7_custom_form_action_url($url) { global $post; $id_to_change = 1; if($post->ID === $id_to_change) return ‘wheretopost.asp’; else return $url; }

Shortcode Attribute not defined

If you look at the defaults for location and popTrigger they have single quotes around them… Assuming this is correct you need to add these around the new location value, so it does not think bottom is an (undefined) javascript variable, but rather a string value, via providing ‘bottom’… Or if you don’t want to … Read more