function custom_admin_css_for_posts_list() { global $pagenow; // Check if we are on the posts listing page if ($pagenow == ‘edit.php’ && (empty($_GET[‘post_type’]) || $_GET[‘post_type’] == ‘post’)) { wp_register_style(‘custom_wp_admin_css’, false); wp_enqueue_style(‘custom_wp_admin_css’); $custom_css = ” #title { width: 400px !important; /* Adjust the…Continue reading
add_action( ‘elementor/query/vehicles_tools_query’, function( $query ) { // Get the term IDs for ‘vehicles’ and ‘tools’ categories by their slugs $term_ids = get_terms([ ‘taxonomy’ => ‘category’, ‘slug’ => [‘vehicles’, ‘tools’], ‘fields’ => ‘ids’, ‘hide_empty’ => true, ]); if ( !empty($term_ids) &&…Continue reading
add_action( ‘elementor/query/custom_exclude_vehicle_tool_subcats’, function ( $query ) { // Find the term IDs for ‘vehicles’ and ‘tools’ categories. $parent_categories = get_terms([ ‘taxonomy’ => ‘category’, ‘slug’ => [‘vehicles’, ‘tools’], ‘fields’ => ‘ids’, ]); $excluded_subcategories = []; if ( !is_wp_error( $parent_categories ) )…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
/** * @link https://library.wpcode.com/snippet/e5wng05d/ * * @param StripeEvent $event Stripe Event. * @param StripeSubscription|StripePaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_add_metadata_to_customer( $event, $object ) { $customer_id = $object->customer->id; $customer = SimplePayCorePaymentsStripe_API::request( ‘Customer’, ‘update’, $customer_id, array( ‘metadata’ => $object->metadata->toArray(), )…Continue reading
add_filter( ‘aioseo_schema_disable’, ‘aioseo_disable_schema_for_specific_page’ ); function aioseo_disable_schema_for_specific_page( $disabled ) { if ( is_page( 1209 ) ) { return true; } return $disabled; }Continue reading