よくある質問

/* ===============================================
  # faq
  =============================================== */

jQuery(function ($) {
  $(".question").on("click", function () {
    /*クリックでコンテンツを開閉*/
    $(this).next().slideToggle(200);
    /*矢印の向きを変更*/
    $(this).toggleClass("open", 200);
  });
});

/* ===============================================
  # faq 排他処理
  =============================================== */

$(function() {
		$('.question').click(function() {
			$(this).toggleClass('open');
			$(this).next().slideToggle();
			$('.question').not($(this)).next().slideUp();
			$('.question').not($(this)).removeClass('open');
		});
	});

acfでiframeを使う方法

functions.phpに以下を追加する

add_filter( 'wp_kses_allowed_html', 'acf_add_allowed_iframe_tag', 10, 2 );
  function acf_add_allowed_iframe_tag( $tags, $context ) {
  if ( $context === 'acf' ) {
  $tags['iframe'] = array(
  'src' => true,
  'height' => true,
  'width' => true,
  'frameborder' => true,
  'allowfullscreen' => true,
  );
  }
  
  return $tags;
  }

MW WP FORM datepickerが動かない

<?php wp_head(); ?> 下に入れる

	&lt;link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
	&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js">&lt;/script>
	&lt;script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js">&lt;/script>

100vhスクロールしたらclass付与

$(window).scroll(function() {
        var height = $(window).height();
        if ($(window).scrollTop() > height) {
            $('header').addClass('is-show');
        } else {
            $('header').removeClass('is-show');
        }
    });

MW WP FORM サンクスページ

thanksページを作りたくないのでパラメータを付ける

functions.php

function my_mwform_after_send( $Data ) {
    if ( $Data->get_form_key() === 'mw-wp-form-xxx' ) {
      $id = $Data->get( 'id' ); $url = get_permalink($id);
      wp_redirect($url.'?q=thanks');
      exit;
    }
  }
  add_action( 'mwform_after_send_mw-wp-form-xxx', 'my_mwform_after_send' );

Warning: Undefined variable $additional_loop in /home/xs271582/amezo.net/public_html/wp-content/themes/amezo/index.php on line 47

Warning: Attempt to read property "max_num_pages" on null in /home/xs271582/amezo.net/public_html/wp-content/themes/amezo/index.php on line 47