/
www
/
wwwroot
/
fxdst.com
/
wp-content
/
themes
/
fxdst
/
Upload File
HOME
<?php /* * @Theme Name:One Nav * @Theme URI:https://www.iotheme.cn/ * @Author: iowen * @Author URI: https://www.iowen.cn/ * @Date: 2021-06-03 08:56:01 * @LastEditors: iowen * @LastEditTime: 2024-07-30 22:08:25 * @FilePath: /WebStack/taxonomy-favorites.php * @Description: 网站分类页 */ if ( ! defined( 'ABSPATH' ) ) { exit; } $__visible = io_is_visible(get_term_meta(get_queried_object_id(), '_view_user', true)); if ($__visible === 0) { wp_safe_redirect( home_url() ); } get_header(); include( 'templates/header-nav.php' ); ?> <div class="main-content"> <?php include( 'templates/header-banner.php' ); ?> <?php if(io_get_option('is_search')){include('search-tool.php'); } else{?> <div class="no-search"></div> <?php } ?> <h4 class="text-gray"><i class="icon-io-tag" style="margin-right: 27px;" id="<?php single_cat_title() ?>"></i><?php single_cat_title() ?></h4> <?php if($__visible == 2){ echo '<div class="login-notice">'.__('此分类需登陆后查看','i_theme').'</div>'; } else { ?> <div class="row"> <?php $current_term = get_queried_object(); $favorites_query = new WP_Query(array( 'post_type' => 'sites', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'meta_key' => '_sites_order', 'orderby' => array('meta_value_num' => 'DESC', 'ID' => 'DESC'), 'tax_query' => array( array( 'taxonomy' => 'favorites', 'field' => 'term_id', 'terms' => $current_term->term_id, ), ), )); if ($favorites_query->have_posts()): while ($favorites_query->have_posts()): $favorites_query->the_post(); $link_url = get_post_meta($post->ID, '_sites_link', true); $default_ico = get_theme_file_uri('/images/favicon.png'); if (io_is_visible(get_post_meta($post->ID, '_visible', true))): ?> <div class="xe-card <?php echo io_get_option('columns') ?> <?php echo get_post_meta($post->ID, '_wechat_qr', true) ? 'wechat' : '' ?>"> <?php include ('templates/site-card.php'); ?> </div> <?php endif; endwhile; wp_reset_postdata(); endif; ?> </div> <br /> <?php } ?> <?php get_footer(); ?>