Register Footer Copyright Year Shortcode
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function year_shortcode () { $year = date_i18n (‘Y’); return $year; } add_shortcode (‘year’, ‘year_shortcode’);Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading
add_filter( ‘comment_form_defaults’, ‘custom_reply_title’ ); function custom_reply_title( $defaults ){ $defaults[‘title_reply_before’] = ‘ ‘; $defaults[‘title_reply_after’] = ‘ ‘; return $defaults; }Continue reading
function remove_pages_from_menu() { if ( current_user_can( ‘editor’ ) ) { remove_menu_page( ‘edit-comments.php’ ); remove_menu_page( ‘edit.php’ ); remove_menu_page( ‘edit.php?post_type=page’ ); remove_menu_page( ‘edit.php?post_type=jet-theme-core’ ); remove_menu_page( ‘tools.php’ ); remove_menu_page( ‘edit.php?post_type=jet-popup’ ); remove_menu_page( ‘edit.php?post_type=jet-form-builder’ ); } } add_action( ‘admin_menu’, ‘remove_pages_from_menu’ ); function remove_link_from_admin_bar( $wp_admin_bar…Continue reading
add_action( ‘wfea_popup_scripts_enqueued’, function () { $script = ‘ window.onbeforeunload = null; // set to null to avoid a message about leaving the page before saved – use if redirecting wfeaModalCallback = function () { console.log(“There has been an Eventbrite checkout.”);…Continue reading
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
// Post Category Archives function grid_query_post_categories( $query_args, $grid_id ) { // Check if the grid ID is 20 if ( 20 !== $grid_id ) { return $query_args; } // Extract the potential category slug from the URL $url_path = parse_url($_SERVER[‘REQUEST_URI’],…Continue reading
add_filter(‘term_link’, ‘custom_vendor_term_link’, 10, 3); function custom_vendor_term_link($url, $term, $taxonomy){ switch ($taxonomy) { case ‘vendor-location’: return home_url(‘/vendor/?_vendor_location=’ . $term->slug); case ‘vendor-category’: return home_url(‘/vendor/?_vendor_category=’ . $term->slug); case ‘vendor-pricing’: return home_url(‘/vendor/?_vendor_pricing=’ . $term->slug); case ‘vendor-zone’: return home_url(‘/vendor/?_vendor_zone=’ . $term->slug); case ‘vendor-identity-attribute’: return home_url(‘/vendor/?_vendor_identity_attributes=’ .…Continue reading
function hello_elementor_child_enqueue_scripts() { wp_enqueue_style(‘constantine’, get_stylesheet_directory_uri() . ‘/style.css’,[‘hello-elementor’],’1.0.0′); } add_action( ‘wp_enqueue_scripts’, ‘hello_elementor_child_enqueue_scripts’ );Continue reading