Change Comment Reply from Heading to Div

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

Change Comment Reply from Heading to Div

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

Disable WP options if editor

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

Completely Disable Comments

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

Update Post Term Link from Vendor Detail Page & Pre-filter Vendor Taxonomy

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

Enqueue child theme

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

Remove Emojis

/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading

Elementor – Fix the Accordion SEO issue

add_filter( ‘elementor/widget/render_content’, function ( $widget_content, $widget ) { if ( ‘accordion’ === $widget->get_name() ) { $widget_content = preg_replace( ‘/]*class=”elementor-accordion-title”[^>]*>(.*?)/’, ‘$1‘, $widget_content ); } if ( ‘toggle’ === $widget->get_name() ) { $widget_content = preg_replace( ‘/]*class=”elementor-toggle-title”[^>]*>(.*?)/’, ‘$1‘, $widget_content ); } return $widget_content;…Continue reading