hide admin bar for users
add_filter(‘show_admin_bar’, function($show) { return current_user_can(‘administrator’) || current_user_can(‘editor’); });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘show_admin_bar’, function($show) { return current_user_can(‘administrator’) || current_user_can(‘editor’); });Continue reading
add_action(‘wp_head’, function () { if (is_front_page()) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_front_page()) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_front_page()) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_front_page()) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_page(‘exhibition-services’)) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_page(‘contact-us’)) { ?>Continue reading
add_action(‘wp_head’, function () { if (is_page(‘about’)) { ?>Continue reading
add_action(‘pmxi_saved_post’, function($post_id, $xml_node, $is_update) { // Check if Polylang & DeepL API are active if (!function_exists(‘pll_set_post_language’) || !class_exists(‘PLL_DeepL’)) return; // Get language code from custom field $lang_code = get_post_meta($post_id, ‘language_code’, true); if (!$lang_code) $lang_code = ‘en’; // Default fallback //…Continue reading
/** * Optimized Dashboard for WPCode Shortcodes * Combined with advanced features from the beautiful version */ // Register our AJAX handler for processing shortcodes – EXACTLY as in “Dashboard Main version” add_action(‘wp_ajax_process_wpcode_shortcode’, ‘myonlytab_process_shortcode’); add_action(‘wp_ajax_nopriv_process_wpcode_shortcode’, ‘myonlytab_process_shortcode’); /** * Process any…Continue reading