2017-07-20 10 views
1

WordPressでメッセージの成功を表示する方法。私はWooCommerceのテンプレートプラグインを使用します。ここに私のCSSのコードは次のとおりです。ワードプレスの登録フォームページでメッセージの成功を表示する方法

.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出力に変数を設定すると、ウェブサイトに表示されます

関連する問題