1. 首页
  2. WordPress钩子手册
  3. 主题相关

WordPress如果或

这是一个很简单的问题,我还没弄明白,因为它太简单了。我该怎么做如果或。代码显示了我想做什么。我觉得我什么都试过了。if ($post_type> if (($post_type> But everything fails.

add_action( \"init\",\"remove_support\");function remove_support()>

Your first example is not at all close. The second one is closer, but I think ACF uses post meta, not post types.

Maybe it\"s just me not being able to think straight, but I\"ve never found the use of NOT operators like> in conjunction with logical AND and OR to be very intuitive. I\"ve found I tend to use OR when I need AND, or vice versa. If your code doesn\"t execute when you think it should, it may be you needed &&而不是1***

WordPress如果或 为WP2原创文章,链接:https://www.wp2.cn/hook/theme_hook/wordpress%e5%a6%82%e6%9e%9c%e6%88%96/

发表评论

您的电子邮箱地址不会被公开。