Home › Forums › WoodMart support forum › Warning: Illegal offset type in isset or empty in /home/customer/www/halfrender.
Warning: Illegal offset type in isset or empty in /home/customer/www/halfrender.
- This topic has 3 replies, 3 voices, and was last updated 3 years, 11 months ago by
Artem Temos.
-
AuthorPosts
-
June 24, 2021 at 7:25 pm #302261
Thompson1977ParticipantHi,
in my site this error appeared, I tried to disable the other plugins and it set the debug of wp to false but I can’t solve the problem.Error:
Warning: Illegal offset type in isset or empty in /home/customer/www/mysite/public_html/wp-includes/class-wp-term-query.php on line 420Thank you.
Thank you.
June 24, 2021 at 11:20 pm #302296
Elise NoromitMemberHello,
Thank you very much for choosing our theme and for contacting us.
Please, provide your site admin access to the private area.
I will check the elements it could happen if you inserted not appropriate value in a field.
Best Regards
June 25, 2021 at 7:16 am #302353
Thompson1977ParticipantThanks
June 25, 2021 at 9:58 am #302414
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file to fix this
function woodmart_portfolio_filters( $category, $type ) { $args = array( 'parent' => $category ); if ( is_array( $category ) ) { $args = array( 'include' => $category ); } $categories = get_terms( 'project-cat', $args ); if ( is_wp_error( $categories ) || ! $categories ) { return; } $wrapper_classes = ''; $all_link_classes = ''; $wrapper_classes .= ' wd-type-' . $type; if ( 'masonry' === $type ) { woodmart_enqueue_js_script( 'portfolio-wd-nav-portfolios' ); $all_link_url = '#'; $all_link_classes .= ' wd-active'; } else { $all_link_url = get_post_type_archive_link( 'portfolio' ); if ( is_post_type_archive( 'portfolio' ) || ! is_tax( 'project-cat' ) ) { $all_link_classes .= ' wd-active'; } } ?> <div class="portfolio-filter wd-nav-wrapper wd-mb-action-swipe text-center<?php echo esc_attr( $wrapper_classes ); ?>"> <ul class="wd-nav-portfolio wd-nav wd-style-underline<?php echo woodmart_get_old_classes( ' masonry-filter' ); ?>"> <li data-filter="*" class="<?php echo esc_attr( $all_link_classes ); ?>"> <a href="<?php echo esc_url( $all_link_url ); ?>"> <span class="nav-link-text"><?php esc_html_e( 'All', 'woodmart' ); ?></span> </a> </li> <?php foreach ( $categories as $category ) : ?> <?php $link_classes = ''; $current_tax = get_queried_object(); if ( 'masonry' === $type ) { $link_url = '#'; } else { $link_url = get_term_link( $category->term_id ); if ( is_tax( 'project-cat' ) && $category->term_id === $current_tax->term_id ) { $link_classes .= ' wd-active'; } } ?> <li data-filter=".proj-cat-<?php echo esc_attr( $category->slug ); ?>" class="<?php echo esc_attr( trim( $link_classes ) ); ?>"> <a href="<?php echo esc_url( $link_url ); ?>"> <span class="nav-link-text"><?php echo esc_html( $category->name ); ?></span> </a> </li> <?php endforeach ?> </ul> </div> <?php }
-
AuthorPosts
Tagged: warnig
- You must be logged in to create new topics. Login / Register