WP Admin – Remove Admin Menu Sidebar Items for non-admin, editor

add_action( ‘admin_menu’, ‘afm_remove_admin_menu_items’); function afm_remove_admin_menu_items() { $user = wp_get_current_user(); $allowed_roles = array( ‘administrator’, ‘editor’ ); if ( ! array_intersect( $allowed_roles, $user->roles ) ) { remove_menu_page( ‘index.php’ ); //’Dashboard’ remove_menu_page( ‘profile.php’ );//Users > Profile } }Continue reading

WP Admin – Remove Dashboard Widgets for Non Admin, Editor

add_action(‘wp_dashboard_setup’, ‘wpdocs_remove_dashboard_widgets’); /** * Remove all dashboard widgets */ function wpdocs_remove_dashboard_widgets() { $user = wp_get_current_user(); $allowed_roles = array( ‘administrator’, ‘editor’ ); if ( ! array_intersect( $allowed_roles, $user->roles ) ) { remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ ); // Right Now remove_meta_box( ‘dashboard_recent_comments’,…Continue reading

Menu Order + Thumbnail

// === Solverius Admin Columns (Menu Order + Thumbnail) === // 1. Kolonları ekle function solverius_add_columns($columns) { $new = []; foreach ($columns as $key => $value) { if ($key === ‘cb’) { $new[$key] = $value; $new[‘thumbnail’] = ‘Görsel’; } else…Continue reading

Product Details ACF V3.3

/** * Productdetails (V=3.3) uit ACF tonen via [dv_productdetails]. * Geschikt voor WooCommerce-productpagina’s en Elementor. */ if ( ! function_exists( ‘dv_productdetails_row’ ) ) { function dv_productdetails_row( $icon, $label, $field, $product_id ) { if ( ! function_exists( ‘get_field’ ) ) {…Continue reading

Product Details -V3.0

/** * Productdetails uit ACF tonen via [dv_productdetails]. */ if ( ! function_exists( ‘dv_productdetails_row’ ) ) { function dv_productdetails_row( $icon, $label, $field ) { if ( ! function_exists( ‘get_field’ ) ) { return ”; } $value = get_field( $field );…Continue reading

Days of the Week Filter Fix (Events List Block)

// 1) Send the checked “Days of the Week” values to the server – the block’s // own JS never does this, it only masks already-loaded events with them. add_action( ‘wp_enqueue_scripts’, function () { if ( ! wp_script_is( ‘sc-frontend-blocks-event-list-js’, ‘registered’…Continue reading