Skip to content

Commit 52dc2c7

Browse files
committed
修复排序可能会随机乱跳
1 parent 3ff47f2 commit 52dc2c7

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

inc/fav-content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function fav_con($mid) { ?>
2121
'ignore_sticky_posts' => 1, //忽略置顶文章
2222
'posts_per_page' => $site_n, //显示的文章数量
2323
'meta_key' => '_sites_order',
24-
'orderby' => 'meta_value_num',
24+
'orderby' => array( 'meta_value_num' => 'DESC', 'ID' => 'DESC' ),
2525
'tax_query' => array(
2626
array(
2727
'taxonomy' => 'favorites', //分类法名称

index.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
}
2626
?>
2727

28+
<div class="sites-list" style="margin-bottom: 8.5rem;">
2829
<?php if(!wp_is_mobile() && io_get_option('ad_home_s')) echo '<div class="row"><div class="ad ad-home col-md-6">' . stripslashes( io_get_option('ad_home') ) . '</div><div class="ad ad-home col-md-6 visible-md-block visible-lg-block">' . stripslashes( io_get_option('ad_home') ) . '</div></div>'; ?>
2930

3031
<?php
@@ -47,7 +48,7 @@
4748
}
4849
}
4950
}
50-
}
51-
52-
51+
} ?>
52+
</div>
53+
<?php
5354
get_footer();

single-sites.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
</div>
9999

100100
<h4 class="text-gray mt-4"><i class="icon-io-tag" style="margin-right: 27px;" id="相关导航"></i>相关导航</h4>
101-
<div class="row mb-5">
101+
<div class="row" style="margin-bottom: 8.5rem;">
102102
<?php
103103
$post_num = 6;
104104
$i = 0;

templates/site-card.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<div class="xe-user-name overflowClip_1">
6262
<strong><?php the_title() ?></strong>
6363
</div>
64-
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?: get_the_excerpt($post->ID); ?></p>
64+
<p class="overflowClip_2"><?php echo get_post_meta($post->ID, '_sites_sescribe', true) ?: preg_replace("/(\s|\&nbsp\;| |\xc2\xa0)/","",get_the_excerpt($post->ID)); ?></p>
6565
</div>
6666
</div>
6767
</a>

0 commit comments

Comments
 (0)