隱藏SEO Ultimate 看影片的通知

安裝SEO Ultimate一直都會出現這個畫面

要將他移除

到function.php輸入以下代碼即可

//隱藏SEO ultimate在控制台一直要強制觀看影片的提示
function seoultimate_remove_video() {
echo '
<style type="text/css">
         div#sdf_dashboard_widget.postbox { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'seoultimate_remove_video');

隱藏Yoast 錯失流量購買pro版通知

//隱藏yoast 錯失流量通知
function remove_yoast_lost_flow() {
echo '
<style type="text/css">
         div.yoast-notification.notice.notice-warning.is-dismissible { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_yoast_lost_flow');

隱藏Yoast 側邊欄廣告

//隱藏Yoast 側邊欄廣告
function remove_yoast_sidebar_ads() {
echo '
<style type="text/css">
         div#sidebar.yoast-sidebar { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_yoast_sidebar_ads');

隱藏Yoast footer 升級廣告

//隱藏Yoast footer 升級廣告
function remove_yoast_footer_upads() {
echo '
<style type="text/css">
         div.yoast_premium_upsell { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_yoast_footer_upads');

隱藏Yoast admin bar 選項

//隱藏Yoast admin bar 選項
function remove_yoast_admin_bar() {
echo '
<style type="text/css">
         li#wp-admin-bar-wpseo-menu.menupop { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_yoast_admin_bar');

隱藏admin bar flatsome 選項

//隱藏admin bar flatsome選項
function remove_flatsome_admin_bar() {
echo '
<style type="text/css">
         li#wp-admin-bar-flatsome_panel { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_flatsome_admin_bar');

隱藏admin bar flatsome 未啟用選項

//隱藏admin bar flatsome 未啟用選項
function remove_flatsome_admin_bar_activate() {
echo '
<style type="text/css">
         li#wp-admin-bar-flatsome-activate { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_flatsome_admin_bar_activate');

隱藏admin bar 更新

//隱藏admin bar 更新
function remove_update_admin_bar() {
echo '
<style type="text/css">
         li#wp-admin-bar-updates { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_update_admin_bar');

//隱藏admin bar wordpress logo
function remove_admin_bar_wplogo() {
echo '
<style type="text/css">
         li#wp-admin-bar-wp-logo { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_wplogo');

隱藏admin bar 留言

//隱藏admin bar 留言
function remove_admin_bar_comments() {
echo '
<style type="text/css">
         li#wp-admin-bar-comments { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_comments');

隱藏admin bar 新增項目

//隱藏admin bar 新增項目
function remove_admin_bar_additems() {
echo '
<style type="text/css">
         li#wp-admin-bar-new-content { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_additems');

隱藏admin bar updraftplus備份

//隱藏updraftplus admin bar 選項
function remove_bckkup_hd_item() {
echo '
<style type="text/css">
         div.ab-item.ab-empty-item { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_bckkup_hd_item');

隱藏admin bar Smart Slider 輪播

//隱藏admin bar Smart Slider 輪播
function remove_admin_bar_smart_slider() {
echo '
<style type="text/css">
         li#wp-admin-bar-smart_slider_3 { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_smart_slider');

隱藏admin bar Buttonizer 聯繫按鈕

//隱藏admin bar Buttonizer 聯繫按鈕
function remove_admin_bar_buttonizer() {
echo '
<style type="text/css">
         li#wp-admin-bar-buttonizer { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_buttonizer');

隱藏admin bar Ubermenu 按鈕

//隱藏admin bar Ubermenu 按鈕
function remove_admin_bar_Ubermenu() {
echo '
<style type="text/css">
         li#wp-admin-bar-ubermenu { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_admin_bar_Ubermenu');

隱藏 wp 歡迎訊息

有時候系統卡住會沒辦法關閉,這時候就直接用程式隱藏

//隱藏 wp 歡迎訊息
function remove_wp_welocome() {
echo '
<style type="text/css">
         div.welcome-panel { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_wp_welocome');

隱藏控制台 網站狀態

//隱藏 隱藏控制台 網站狀態
function remove_site_health() {
echo '
<style type="text/css">
         div#dashboard_site_health.postbox { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_site_health');

隱藏Ocean Extra 更新通知

//隱藏Ocean Extra 更新通知
function remove_ocean_extra_update() {
echo '
<style type="text/css">
         div#setting-error-tgmpa.notice.notice-warning.settings-error.is-dismissible { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_ocean_extra_update');

隱藏綠界官方金流的錯誤消息

有時候明明就已經兩個都啟用了 還發錯誤消息實在很煩

直接將它隱藏掉

//隱藏綠界官方金流的錯誤消息
function remove_ecpay_error_notice() {
echo '
<style type="text/css">
         div.notice.notice-error { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_ecpay_error_notice');

隱藏smart coupon 後台的一些區塊

//隱藏smart coupon 官網連結按鈕
function remove_smart_coupon_weblink() {
echo '
<style type="text/css">
         a.nav-tab.premium_promo.nav-tab-premium { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_smart_coupon_weblink');

//隱藏smart coupon 高級版區塊
function remove_smart_coupon_premium() {
echo '
<style type="text/css">
         div.wt_smart_coupon_premium { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_smart_coupon_premium');

//隱藏smart coupon 評論區塊
function remove_smart_coupon_review() {
echo '
<style type="text/css">
         div.wt-review-widget { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_smart_coupon_review');

隱藏woo 移除舊版優惠券提醒

//隱藏woo 移除舊版優惠券提醒
function remove_woo_old_coupon() {
echo '
<style type="text/css">
         div.components-card.woocommerce-store-alerts { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_woo_old_coupon');

隱藏新版Elementor的admin bar

//隱藏新版Elementor的admin bar
function remove_new_elementor_adminbar() {
echo '
<style type="text/css">
         div.e-admin-top-bar { display: none !important; }<br />       </style>
';
}
add_action('admin_head', 'remove_new_elementor_adminbar');

備註:這個也可以直接從【顯示項目設定】> Elementor Top Bar > 取消勾選即可

隱藏 Elementor 主題建構器提示

//隱藏 Elementor 主題建構器提示
function elementor_theme_builder_re() {
echo '
<style>
	.notice.e-notice.e-notice--dismissible.e-notice--extended { display: none; }
</style>';
}
add_action('admin_head', 'elementor_theme_builder_re');

隱藏後台-編輯使用者資料部分欄位

//隱藏-編輯個人資料的部分欄位,順序如下
//1.視覺化編輯器 2.鍵盤快速鍵 3.工具列 4.姓氏 5.個人網站網址 
//6.個人資料圖片 7.語法醒目提示 8.Wordfence Login Security 9.2FA Status 10.密碼重設郵件
//11.應用程式密碼(ps.要先將wordfence的禁用打開才能隱藏)
function remove_Author_setting() {
echo '
<style type="text/css">
	tr.user-rich-editing-wrap { display: none !important; }
	tr.user-comment-shortcuts-wrap { display: none !important; }
	tr.show-admin-bar.user-admin-bar-front-wrap { display: none !important; }
	tr.user-last-name-wrap { display: none !important; }
	tr.user-url-wrap { display: none !important; }
	tr.user-profile-picture { display: none !important; }
	tr.user-syntax-highlighting-wrap { display: none !important; }
	h2#wfls-user-settings { display: none !important; }
	tr#wordfence-ls { display: none !important; }
	tr.user-generate-reset-link-wrap.hide-if-no-js { display: none !important; }
	div.application-passwords.hide-if-no-js { display: none !important; }
</style> 
';
}
add_action('admin_head', 'remove_Author_setting');
最後修改日期: 2022 年 6 月 21 日

作者