Remove / Disable default custom.css?ver=1.0.0

Here’s how you could use the wp_dequeue_style function in a WordPress hook to unenqueue the custom-css stylesheet: function wpsx411806_unenqueue_custom_css() { wp_dequeue_style( ‘custom-css’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpsx411806_unenqueue_custom_css’ ); In this example, the wpsx411806_unenqueue_custom_css function uses the wp_dequeue_style function to unenqueue the custom-css stylesheet. The function is then registered as a callback for the wp_enqueue_scripts hook.

How to remove a filter that is an object method?

That’s a very good question. It goes down to the dark heart of the plugin API and best programming practices. For the following answer I created a simple plugin to illustrate the problem with easy to read code. <?php # -*- coding: utf-8 -*- /* Plugin Name: Anonymous OOP Action */ if ( ! class_exists( … Read more

WordPress not available to file using wp-env for xdebug requests

What the issue ended up being is embarrassing! I had used the xdebug configuration as the entire launch.json file: { “name”: “Listen for XDebug”, “type”: “php”, “request”: “launch”, “port”: 9003, “pathMappings”: { “/var/www/html/wp-content/plugins/my-plugin”: “${workspaceFolder}/” } } As opposed to the correct: { “version”: “0.2.0”, “configurations”: [ { “name”: “Listen for XDebug”, “type”: “php”, “request”: “launch”, … Read more

Dashboard show only published pages instead of all pages

Try this solution. Works for me. add_action( ‘admin_menu’, ‘customize_pages_admin_menu_callback’ ); function customize_pages_admin_menu_callback() { global $submenu; foreach ( $submenu[‘edit.php?post_type=page’] as $key => $value ) { if ( in_array( ‘edit.php?post_type=page’, $value ) ) { $submenu[‘edit.php?post_type=page’][ $key ][2] = ‘edit.php?post_status=publish&post_type=page’; } } } further, you can also hide All using CSS if needed. <style> .post-type-page .subsubsub .all{ display:none} … Read more

Text before price on WooCom

Try this out. Add other conditional tags according to the requirement. Hope it helps. // Add text before price function bd_rrp_price_html( $price, $product ) { if(is_shop()){ $price=”Rent from: ” . $price; } return $price; } add_filter( ‘woocommerce_get_price_html’, ‘bd_rrp_price_html’, 100, 2 );