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

List all ACF field values across every post on one page

You want to start here and here. Essentially you’re just looping through all your posts like normal and then adding some custom fields into it. Be sure to reference the Repeater Field documentation. This should work inside a loop. Notice you’ll need your post ID. <ul> <?php if( have_rows(‘YOURREPEATERFIELDNAMEHERE’, ‘POSTIDHERE’) ): while ( have_rows(‘YOURREPEATERFIELDNAMEHERE’, ‘POSTIDHERE’) … Read more

add_action in wp_head accessible from class

You’re using the static class method call when supplying a callable/callback to add_action(): add_action( ‘wp_head’, array( ‘test_class’, ‘greeting_head’ ) ); So you should make the greeting_head() a static method in your test_class class. But you’d also need to make the greeting() a static method: class test_class { public static function greeting() { echo ‘Howdy! Test … Read more