If or
-
This is a pretty simple question honestly confused I haven’t figured this out by now because it is so simple. How do I do if or. The code kinda shows what I want to do. I have feel like I have tried everything.
if ($post_type != 'acf-field-group || ct_template')
if (($post_type != 'acf-field-group') || ($post_type != 'ct_template'))
But everything fails.add_action( 'init','remove_support'); function remove_support() { $post_types = get_post_types(); foreach ($post_types as $post_type ) { if ($post_type != 'acf-field-group') { if ($post_type != 'ct_template') { if ($post_type != 'search-filter-widget') { remove_post_type_support($post_type, 'editor'); remove_post_type_support($post_type, 'title'); remove_post_type_support($post_type, 'author'); remove_post_type_support($post_type, 'thumbnail'); remove_post_type_support($post_type, 'trackbacks'); remove_post_type_support($post_type, 'comments'); remove_post_type_support($post_type, 'revisions'); remove_post_type_support($post_type, 'post-formats'); } } } } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘If or’ is closed to new replies.