ご注意!

この記事には PHP コードが含まれており、開発者を対象としています。このコードは便宜上提供していますが、コードのカスタマイズやサードパーティの開発についてはサポートを提供していません。

追加のガイダンスについては、WPBeginner の カスタムコードの追加方法に関するチュートリアル を参照してください。

閉じる

説明

The wpforms_form_pages_content_after action fires after a form is displayed on the site’s frontend, and the form was created with the Form Pages addon.

パラメーター

このアクションはパラメーターを受け付けません。

詳細情報

The action only fires for valid non-empty forms, it executes after the output rendering process for forms created with the Form Pages addon.

An alternate action to consider is wpforms_form_pages_content_before, as it functions similarly, except only fires before the form is displayed.

ソース

wpforms-form-pages/templates/single-form.php

You could use this action to display a video, more content, or a link after the Form Pages form.

/**
 * Output something after your Form Pages form(s).
 * 
 * @link  https://wpforms.com/developers/wpforms_frontend_output_after/
 */
function wpf_dev_form_pages_content_after( ) {
      
    // Run code.
    echo '<iframe width="660" height="315" src="https://www.youtube.com/embed/mUGYPlAgJPw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
 
  
}
add_action( 'wpforms_form_pages_content_after', 'wpf_dev_form_pages_content_after' );
You can display anything after the Form Pages form using the wpforms_form_pages_content_after action