Update this code:
/* Entire Website */ $meta_args = “pm.meta_value LIKE ‘%\”basic-global\”%'”; switch ( $current_page_type ) { case ‘is_404’: $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-404\”%'”; break; case ‘is_search’: $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-search\”%'”; break; case ‘is_archive’: case ‘is_tax’: case ‘is_date’: case ‘is_author’: $meta_args .= ” OR pm.meta_value LIKE ‘%\”basic-archives\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”{$current_post_type}|all|archive\”%'”; if ( ‘is_tax’ == $current_page_type && ( is_category() || is_tag() || is_tax() ) ) { if ( is_object( $q_obj ) ) { $meta_args .= ” OR pm.meta_value LIKE ‘%\”{$current_post_type}|all|taxarchive|{$q_obj->taxonomy}\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”tax-{$q_obj->term_id}\”%'”; } } elseif ( ‘is_date’ == $current_page_type ) { $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-date\”%'”; } elseif ( ‘is_author’ == $current_page_type ) { $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-author\”%'”; } break; case ‘is_home’: $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-blog\”%'”; break; case ‘is_front_page’: $current_post_id = $current_id; $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-front\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”{$current_post_type}|all\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”post-{$current_id}\”%'”; break; case ‘is_singular’: $current_post_id = $current_id; $meta_args .= ” OR pm.meta_value LIKE ‘%\”basic-singulars\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”{$current_post_type}|all\”%'”; $meta_args .= ” OR pm.meta_value LIKE ‘%\”post-{$current_id}\”%'”; $taxonomies = get_object_taxonomies( $q_obj->post_type ); $terms = wp_get_post_terms( $q_obj->ID, $taxonomies ); foreach ( $terms as $key => $term ) { $meta_args .= ” OR pm.meta_value LIKE ‘%\”tax-{$term->term_id}-single-{$term->taxonomy}\”%'”; } break; case ‘is_woo_shop_page’: $meta_args .= ” OR pm.meta_value LIKE ‘%\”special-woo-shop\”%'”; break; case ”: $current_post_id = $current_id; break; }
To this code that I corrected:
/* Entire Website */
$meta_args = “pm.meta_value LIKE ‘%\”basic-global\”%'”;
switch ($current_page_type) {
case ‘is_404’:
$meta_args .= ” OR pm.meta_value LIKE ‘%\”special-404\”%'”;
break;
case ‘is_search’:
$meta_args .= ” OR pm.meta_value LIKE ‘%\”special-search\”%'”;
break;
case ‘is_archive’:
case ‘is_tax’:
case ‘is_date’:
case ‘is_author’:
$meta_args .= ” OR pm.meta_value LIKE ‘%\”basic-archives\”%'”;
$meta_args .= ” OR pm.meta_value LIKE ‘%\”{$current_post_type}|all|archive\”%'”;
if ('is_tax' == $current_page_type && (is_category() || is_tag() || is_tax())) {
if (is_object($q_obj)) {
$meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all|taxarchive|{$q_obj->taxonomy}\"%'";
$meta_args .= " OR pm.meta_value LIKE '%\"tax-{$q_obj->term_id}\"%'";
}
} elseif ('is_date' == $current_page_type) {
$meta_args .= " OR pm.meta_value LIKE '%\"special-date\"%'";
} elseif ('is_author' == $current_page_type) {
$meta_args .= " OR pm.meta_value LIKE '%\"special-author\"%'";
}
break;
case 'is_home':
$meta_args .= " OR pm.meta_value LIKE '%\"special-blog\"%'";
break;
case 'is_front_page':
$current_post_id = $current_id;
$meta_args .= " OR pm.meta_value LIKE '%\"special-front\"%'";
$meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all\"%'";
$meta_args .= " OR pm.meta_value LIKE '%\"post-{$current_id}\"%'";
break;
case 'is_singular':
$current_post_id = $current_id;
$meta_args .= " OR pm.meta_value LIKE '%\"basic-singulars\"%'";
$meta_args .= " OR pm.meta_value LIKE '%\"{$current_post_type}|all\"%'";
$meta_args .= " OR pm.meta_value LIKE '%\"post-{$current_id}\"%'";
if (is_object($q_obj)) {
$taxonomies = get_object_taxonomies($q_obj->post_type);
$terms = wp_get_post_terms($q_obj->ID, $taxonomies);
foreach ($terms as $key => $term) {
$meta_args .= " OR pm.meta_value LIKE '%\"tax-{$term->term_id}-single-{$term->taxonomy}\"%'";
}
}
break;
case 'is_woo_shop_page':
$meta_args .= " OR pm.meta_value LIKE '%\"special-woo-shop\"%'";
break;
case '':
$current_post_id = $current_id;
break;
}