概要
<?php get_template_part( $slug, $name ); ?>
これだと変数に値を読み込んでくれないなどの問題が発生した。
解決策
<?php include( locate_template( './slug-name.php' ) ); ?>
これに置き換えたらどうにかなった。
参考
get_template_part in a foreach loop and access to a var of item
Go to list of users who liked
More than 5 years have passed since last update.
<?php get_template_part( $slug, $name ); ?>
これだと変数に値を読み込んでくれないなどの問題が発生した。
<?php include( locate_template( './slug-name.php' ) ); ?>
これに置き換えたらどうにかなった。
get_template_part in a foreach loop and access to a var of item
Register as a new user and use Qiita more conveniently
Go to list of users who liked