Warning: Trying to access array offset on null in /home/c6645833/public_html/monoxa.net/wp-content/themes/site/inc/mx-title.php on line 414
[WordPress] is_tax()は非推奨でtaxonomy_exists()を使え、ってことで。 | 開発 | 2014年5月16日 | モノグサにお灸

Warning: Trying to access array offset on null in /home/c6645833/public_html/monoxa.net/wp-content/themes/site/inc/mx-shortcodes.php on line 1947

[WordPress] is_tax()は非推奨でtaxonomy_exists()を使え、ってことで。

作成日:

is_tax()を当たり前のように使っていたのだけど、テーマを機能毎に分割していく内に効かなくなってしまいました。

Template redirect is_tax() not working http://wordpress.stackexchange.com/questions/55445/template-redirect-is-tax-not-working

I'm trying to do a template redirect in my wordpress but with partial success function ahaali_qa_theme_redirect(){ global $wp; $plugindir = dirname(__FILE__); if(is_archive()){ ...

曰く「is_tax()はWordPress3.0から非推奨になりました。代わりにtaxonomy_exists()使いなさい」とのこと。

taxonomy_exists()に切り替えたら問題は解決しました。

物草 灸太郎

WordPressでホームページを制作しつつ、休日は畑を耕したりDIYを楽しんでいます。

コメントをどうぞ

  • メールアドレスが公開されることはありません。
  • コメント欄にURLは入力できません。
  • このサイトはreCAPTCHAによって保護されており、Googleのプライバシーポリシー利用規約が適用されます。