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

Create a form to get user information for payment gateway

I found the answer, and I put here for anyone who want to this: For showing custom fields below codes should add to function payment_fields: public function payment_fields(){ if ( $description = $this->get_description() ) { echo wpautop( wptexturize( $description ) ); } ?> <div id=”custom_input”> <p class=”form-row form-row-wide”> <label for=”TedadGhest” class=””> <?php _e(‘number of installment’, … Read more

Overriding inline !important CSS with Javscript code snippet with media query

why you prefer use javascript instead off css it self? javascript will overwrite the css rules if you put in wrong ways. please provide me the web inspect (if you use chrome or firefox). sometimes, css will not work if precedence not qualified reff: https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity if you cant provide the web inspect, would you like … Read more

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

Critical Error message of WordPress adming

If you can access your dashboard, deactivate all the plugins and activate it one by one, and check your website. If you are not able to access your WP Dashboard because of this error. Go to your hosting Cpanel > File Manager > Public_html > wp-content, rename the plugin folder, and then check your website. … Read more