Fix ACF content not displaying in the filter result – Content Grid
add_filter( ‘pp_cg_beaver_themer_parse_shortcodes’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘pp_cg_beaver_themer_parse_shortcodes’, ‘__return_false’ );Continue reading
/** * Change number of products that are displayed per page (shop page) */ add_filter( ‘loop_shop_per_page’, ‘new_loop_shop_per_page’, 20 ); function new_loop_shop_per_page( $cols ) { // $cols contains the current number of products per page based on the value stored on…Continue reading
/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading
/** * Main plugin class. * * Security / Maintainability / Accessibility notes: * – No user-supplied input is processed; configuration is fixed server-side. * – We scope changes to Jetpack Instant Search via its documented filter, so normal queries,…Continue reading
// === SCHEMA: define every shortcode, its params, and internal template === $shortcode_schemas = [ ‘faqs’ => [ ‘description’ => ‘Expandable FAQ section.’, ‘parameters’ => [], ‘_internal’ => [ ‘template_id’ => 3676 ], // INTERNAL ONLY ], // [faq faqs='[{“question”:”…”,”answer”:”…”}]’]…Continue reading
add_action(‘init’, function () { if (is_admin()) { return; } if (empty($_COOKIE[‘rd_session_params’])) { return; } $raw = wp_unslash($_COOKIE[‘rd_session_params’]); $data = json_decode($raw, true); if (!is_array($data)) { return; } foreach ($data as $k => $v) { if (!is_string($k) || $k === ”) {…Continue reading
// This creates an avater Shortode function bb_logged_in_user_avatar_shortcode($atts) { if (is_user_logged_in()) { $current_user = wp_get_current_user(); $avatar = get_avatar($current_user->ID, 96); // 96 is the size in pixels return $avatar; } else { return ”; } } // This creates an USER…Continue reading
add_post_type_support( ‘page’, ‘excerpt’ );Continue reading
add_action(‘template_redirect’, function () { if (preg_match(‘#^/members/(.+)#’, $_SERVER[‘REQUEST_URI’], $matches)) { wp_redirect(home_url(‘/’ . $matches[1]), 301); exit; } });Continue reading