ID : (int) get_queried_object_id(); $show_cat_id = get_post_meta($post_id, 'navs_show_cat_id', true); if (!is_array($show_cat_id)) { $show_cat_id = $show_cat_id !== '' && $show_cat_id !== null ? array_values(array_filter(array_map('intval', (array) $show_cat_id))) : []; } else { $show_cat_id = array_values(array_filter(array_map('intval', $show_cat_id))); } $page_desc = (string) get_post_meta($post_id, 'navs_page_desc', true); $page_name = (string) get_post_meta($post_id, 'navs_page_name', true); $title = get_the_title($post_id); $page_name = $page_name !== '' ? $page_name : $title; $all_cats = get_categories([ 'orderby' => 'term_group', 'order' => 'ASC', 'hide_empty' => false, ]); $can_admin = is_user_logged_in() && current_user_can('manage_options'); get_header(); ?>
' . esc_html__('尚未选择分类,请点击标题旁「设置」配置要展示的分类。', 'aksrt') . '
'; echo '' . esc_html__('暂无导航内容', 'aksrt') . '
'; echo '