|
6 | 6 | * @Author URI: https://www.iowen.cn/ |
7 | 7 | * @Date: 2020-02-22 21:26:05 |
8 | 8 | * @LastEditors: iowen |
9 | | - * @LastEditTime: 2023-02-20 20:52:23 |
10 | | - * @FilePath: \WebStack\archive.php |
| 9 | + * @LastEditTime: 2024-07-30 18:25:17 |
| 10 | + * @FilePath: /WebStack/archive.php |
11 | 11 | * @Description: |
12 | 12 | */ |
13 | 13 | if ( ! defined( 'ABSPATH' ) ) { exit; } |
14 | 14 | get_header(); ?> |
15 | 15 |
|
16 | 16 |
|
17 | 17 | <?php |
18 | | -$categories= get_categories(array( |
19 | | - 'taxonomy' => 'favorites', |
20 | | - 'meta_key' => '_term_order', |
21 | | - 'orderby' => 'meta_value_num', |
22 | | - 'order' => 'desc', |
23 | | - 'hide_empty' => 0, |
24 | | - ) |
25 | | -); |
26 | 18 | include( 'templates/header-nav.php' ); |
27 | 19 | ?> |
28 | 20 | <div class="main-content"> |
29 | 21 |
|
30 | 22 | <?php include( 'templates/header-banner.php' ); ?> |
31 | 23 |
|
32 | | - <?php |
33 | | - if(io_get_option('is_search')){include('search-tool.php'); } |
34 | | - else{?> |
35 | | - <div class="no-search"></div> |
36 | | - <?php } ?> |
37 | | - <h4 class="text-gray"><i class="icon-io-tag" style="margin-right: 27px;" id="<?php single_cat_title() ?>"></i><?php single_cat_title() ?></h4> |
38 | | - <div class="row"> |
39 | | - <?php if ( have_posts() ) : ?> |
40 | | - <?php while ( have_posts() ) : the_post(); |
41 | | - $link_url = get_post_meta($post->ID, '_sites_link', true); |
42 | | - $default_ico = get_theme_file_uri('/images/favicon.png'); |
43 | | - if(current_user_can('level_10') || get_post_meta($post->ID, '_visible', true)==""): |
44 | | - ?> |
45 | | - <div class="xe-card <?php echo io_get_option('columns') ?> <?php echo get_post_meta($post->ID, '_wechat_qr', true)? 'wechat':''?>"> |
46 | | - <?php include( 'templates/site-card.php' ); ?> |
47 | | - </div> |
48 | | - <?php endif; endwhile; endif;?> |
49 | | - </div> |
50 | | - <br /> |
51 | 24 |
|
52 | | - <div class="posts-nav"> |
53 | | - <?php echo paginate_links(array( |
54 | | - 'prev_next' => 0, |
55 | | - 'before_page_number' => '', |
56 | | - 'mid_size' => 2, |
57 | | - ));?> |
58 | | - </div> |
| 25 | + <div class="container"> |
| 26 | + <div class="row mt-5 mt-sm-0"> |
| 27 | + <div class="col-12 mx-auto"> |
| 28 | + <h1 class="text-gray"><i class="icon-io-tag" style="margin-right: 27px;" id="<?php single_cat_title() ?>"></i><?php single_cat_title() ?></h1> |
| 29 | + <div class="panel panel-default"> |
| 30 | + <div class="cat_list"> |
| 31 | + <?php if ( have_posts() ) : ?> |
| 32 | + <?php while ( have_posts() ) : the_post();?> |
| 33 | + <div class="list-content my-3 pb-4"> |
| 34 | + <h2 class="post-title"> |
| 35 | + <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="list-title text-lg overflowClip_2"><?php the_title(); ?></a> |
| 36 | + </h2> |
| 37 | + <div class="post-meta d-flex align-items-center text-muted text-xs"> |
| 38 | + <?php |
| 39 | + $category = get_the_category(); |
| 40 | + if($category[0]){ ?> |
| 41 | + <span><i class="fa fa-folder mr-1"></i> |
| 42 | + <a href="<?php echo get_category_link($category[0]->term_id ) ?>"><?php echo $category[0]->cat_name ?></a> |
| 43 | + </span> |
| 44 | + <?php } ?> |
| 45 | + <span class="ml-auto"><i class="fa fa-calendar mr-1"></i> |
| 46 | + <time class="mx-1"><?php echo get_the_time('Y-m-d G:i') ?></time> |
| 47 | + </span> |
| 48 | + </div> |
| 49 | + <div class="list-desc text-sm text-secondary my-4"> |
| 50 | + <div class="overflowClip_2 "><?php echo io_get_excerpt(150) ?></div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + <?php endwhile; endif;?> |
| 54 | + </div> |
| 55 | + <div class="posts-nav"> |
| 56 | + <?php echo paginate_links(array( |
| 57 | + 'prev_next' => 0, |
| 58 | + 'before_page_number' => '', |
| 59 | + 'mid_size' => 2, |
| 60 | + ));?> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
59 | 66 |
|
60 | 67 | <?php get_footer(); ?> |
0 commit comments