MW WP FORM datepickerが動かない

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

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

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' );

timthumb

functions.php

/* ===============================================
# timthumb
=============================================== */
define('THEME_DIR', get_template_directory_uri());
/* Timthumb CropCropimg */
function thumbCrop($img='', $w=false, $h=false , $zc=1, $a=false, $cc=false ){
    if($h)
        $h = "&amp;h=$h";
    else
        $h = "";
    if($w)
        $w = "&amp;w=$w";
    else
        $w = "";
	if($a)
        $a = "&amp;a=$a";
    else
        $a = "";
	if($cc)
        $cc = "&amp;cc=$cc";
    else
        $cc = "";
    $img = str_replace(get_bloginfo('url'), '', $img);
     $image_url = str_replace("http://","http://",THEME_DIR) . "/timthumb/timthumb.php?src=" . $img . $h . $w. "&amp;zc=".$zc .$a .$cc;
    return $image_url;
}

HTML

} ?>

[WordPress]コンテンツエディタ削除

/* ===============================================
# エディタ削除
=============================================== */

function top_disable_block_editor($use_block_editor, $post){
	$post_type = $post->post_type;
	$post_name = $post->post_name;

	if($post_type === 'post' || $post_type === 'directsalon') return false;
	return $use_block_editor;
}
add_filter( 'use_block_editor_for_post', 'top_disable_block_editor', 10, 2 );

WordPress データベースからユーザーアカウントを作成する方法

1. wp_usersテーブルへの追加

・user_login:ユーザーID
・user_pass:md5を選択し、md5変換したパスワードを入力
・user_email:受信できるメールアドレス
・user_registered:(任意の日付)
・user_status:0

MD5変換ツールはこちら

2. wp_usermetaテーブルへ権限情報追加

・user_id…先ほど追加したユーザーIDの数値
・meta_key…「wp_capabilities」と入力
・meta_value…「a:1:{s:13:”administrator”;b:1;}」と入力

・user_id…先ほど追加したユーザーIDの数値(上と同じもの)
・meta_key…「wp_user_level」と入力
・meta_value…「10」と入力

WordPress カレント表示

<?php
  $current_page_id = $wp_query->get_queried_object_id();
  $args = array(
      'posts_per_page' => -1,
      'post_type' => 'カスタム投稿'
  );
  $my_posts = get_posts($args);
?>
<?php foreach ($my_posts as $post): setup_postdata($post); ?>
  <li class="<?php if ($current_page_id == $post->ID ) {echo 'is_active';} ?>">
      <a href="<?php the_permalink(); ?>">
          <?php the_title(); ?>
      </a>
  </li>
<?php endforeach; ?>
<?php wp_reset_postdata(); ?>

WordPressの個別ページに投稿一覧を表示してページャーがうまく動かない場合

$paged = get_query_var('page') ? get_query_var('page') : 1;
$args = array(
'post_type' => 'post',
'posts_per_page' => 12,
'paged' => $paged,
);
$my_query = new WP_Query($args);
$max_num_pages = $my_query->max_num_pages;
if( $my_query -> have_posts() ) :
while($my_query -> have_posts()) : $my_query -> the_post();
endwhile;
endif;

if (function_exists('responsive_pagination')) {
responsive_pagination($additional_loop->max_num_pages);
}

wp_reset_postdata();

$paged = get_query_var(‘page’) ? get_query_var(‘page’) : 1;がポイント。
$paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1;ではない。