Error: Selected list type not found.

'; } // Buffer output ob_start(); // Add the "More Lists" button echo ''. jvbIcon('plus', ['title'=>'More Lists']).' More Lists'; // Get the list data $list = get_option(BASE.$selected_type['slug'].'_list'); $list = false; // If refresh cache is enabled or list doesn't exist, regenerate it if ($refresh_cache || $list === false) { $list = array(); if ($selected_type['type'] == 'post') { $get = new WP_Query(array( 'post_type' => $selected_type['slug'], 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' )); if ($get->have_posts()) { while ($get->have_posts()) { $get->the_post(); $extra = false; if (!empty($selected_type['links'])) { $extra = []; foreach ($selected_type['links'] as $item) { $terms = get_the_terms(get_the_ID(), $item); if ($terms && !is_wp_error($terms)) { $term = $terms[0]; $extra[] = [ 'name' => html_entity_decode($term->name), 'url' => get_term_link($term->term_id, $item), 'id' => $term->term_id, 'type' => $item, ]; } } } $list = jvbAlphabetizeMe( $list, get_the_title(), get_the_permalink(), get_the_ID(), $extra ); } } wp_reset_postdata(); } elseif ($selected_type['type'] == 'term') { $terms = get_terms(array( 'taxonomy' => $selected_type['slug'], 'hide_empty' => true, 'orderby' => 'name', 'order' => 'ASC', )); if ($terms) { foreach ($terms as $term) { $extra = false; $list = jvbAlphabetizeMe( $list, html_entity_decode($term->name), get_term_link($term->term_id, $selected_type['slug']), $term->term_id, $extra ); } } } update_option(BASE.$selected_type['slug'].'_list', $list); } // Check if this is a hierarchical type if (array_key_exists('hierarchical', $selected_type) && $selected_type['hierarchical']) { echo jvbRenderThemesHierarchical(); return ob_get_clean(); } // Build the HTML output $out = '
'; if (empty($list)) { $out .= '

Nothing here.

We don\'t have anything to show here yet.

'; } else { $out .= ''; } $out .= '
'; echo $out; echo JVB()->directories()?->renderNavigation(); return ob_get_clean(); }