How to remove ID and class from menu

Ref wordpress out put will be like contac Us if you want to add any class then add in function.php add_filter(‘nav_menu_css_class’, ‘my_css_attributes_filter’, 50, 1); add_filter(‘nav_menu_item_id’, ‘my_css_attributes_filter’, 50, 1); add_filter(‘page_css_class’, ‘my_css_attributes_filter’, 50, 1); function my_css_attributes_filter($var) { return is_array($var) ? array_intersect($var, array(‘current-menu-item’)) : ”; } output will be like Blog Media(active page) Payment

how to show post views without plugins

add bellow code in function.php file function getPostViews($postID){ $count_key = ‘post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘1’); return “1”; } return $count.”; } function setPostViews($postID) { $count_key = ‘post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘1’); }else{ $count++; update_post_meta($postID, $count_key, $count); } } […]

Hello world!

Hi Internet, I wanted to start my tech blog long time ago but I couldn’t as I have always been busy as hell. This is not exactly a tech blog to solve others’ problems but it’s just my notepad where I would like to write my daily notes, my regular problems and the solutions I […]