2017-07-20 55 views
1

如何在WordPress中顯示消息成功。我使用WooCommerce模板插件。這裏是我的CSS代碼:如何在wordpress中以註冊表形式顯示消息成功

.alert.success { 
    padding: 20px; 
    background-color: #4CAF50; 
    color: white; 
    opacity: 1; 
    transition: opacity 0.6s; 
    margin-bottom: 15px; 
    display: hide; 
} 

這是我的表單處理程序:

wp_safe_redirect(apply_filters('woocommerce_registration_redirect', wp_get_referer() ? wp_get_referer() : wc_get_page_permalink('myaccount'))); 
exit; 

我function.php:

add_filter('woocommerce_registration_redirect', 'maxlian_cw_register_redirect'); 
    function maxlian_cw_register_redirect($redirect) { 
     $redirect = get_site_url().'/my-account'; 
     return $redirect; 
    } 

回答

1

只需創建和呼應的頁面,你想有一個PHP變量顯示警報,並在成功運行查詢後將變量設置爲您要顯示的html輸出,並將顯示在您的網站上

相關問題