可能是在事件结束时,它会根据使用Tribe事件插件的事件类别显示不同的信息?
我正在尝试使用此代码,但我没有成功
<?php do_action('tribe_get_event_cat_slugs');
if ( $slugs = ((array) 'charity') ) : ?>
<p>If is 'charity' slug</p>
<?php else : ?>
<p>If is 'charity' slug</p>
[contact-form-7 id="770" title="Inscrieri"]
<?php endif?>
你的代码
<?php if ( $slugs = ((array) 'charity') ) {} ?>
将((array) 'charity') )
分配给$slugs
。请务必阅读comparison operators上的文档。