Clicking custom plugin admin menu redirects to “No Update Required” on live site

The bug was caused because of sloppy code design. Which lead to using too many require. Changing function plugin_setup_menu() { $icon_url = PLUGIN_URL . “public/images/dash-icon.png”; add_menu_page(__(PLUGIN_NAME, PLUGIN_SLUG), __(PLUGIN_NAME, PLUGIN_SLUG), ‘manage_options’, PLUGIN_SLUG, array(‘views’, ‘admin’), $icon_url); } to function plugin_setup_menu() { $icon_url = PLUGIN_URL . “public/images/dash-icon.png”; add_menu_page(PLUGIN_NAME, PLUGIN_NAME, ‘manage_options’, PLUGIN_SLUG, array($this,’admin_menu_view’), $icon_url); } and adding another method … Read more

How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it

Try this one in your theme custom page or debugging page: <?php $args = array( ‘post_type’ => ‘offer’, ‘posts_per_page’ => -1 //show all posts ); $loop = new WP_Query($args); if($loop->have_posts()){ while($loop->have_posts()){ $loop->the_post(); $id = get_the_ID(); $tax = get_the_terms($id, ‘hotel’); print_r($tax); }//endwhile wp_reset_postdata(); }//endif

How to display the custom post related blog by category?

I don’t know below code is the best code but it’s solved my issues function relatedBlogPost($atts){ global $post; //this the the custom post type $args_cat = array( ‘taxonomy’ => ‘blogs_cat’, ‘orderby’ => ‘name’, ‘show_count’ => 1, ‘pad_counts’ => 1, ‘hierarchical’ => 1, ‘echo’ => 0 ); $categories = get_the_terms($post->ID, “blogs_cat”); // getting the category id … Read more