|
@@ -37,11 +37,11 @@ get_header();
|
|
|
|
|
|
// 获取分页参数
|
|
|
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
|
|
-
|
|
|
+ $pageSize = $cat_id == 40 ? 5 : 9;
|
|
|
// 查询参数
|
|
|
$args = array(
|
|
|
'cat' => $category_id, // 分类ID
|
|
|
- 'posts_per_page' => 9, // 每页显示的文章数量
|
|
|
+ 'posts_per_page' => $pageSize, // 每页显示的文章数量
|
|
|
'paged' => $paged
|
|
|
);
|
|
|
|
|
@@ -60,13 +60,18 @@ get_header();
|
|
|
// 在这里编写你的文章列表
|
|
|
$post_id = get_the_ID(); // 获取文章ID
|
|
|
$excerpt = get_the_excerpt(); // 获取摘要
|
|
|
-
|
|
|
+ $content = get_the_content(); // 文字内容
|
|
|
// 招聘信息
|
|
|
if($cat_id == 40){
|
|
|
?>
|
|
|
- <li>
|
|
|
- <h3><?php the_title(); ?></h3>
|
|
|
- <p><?php echo $excerpt; ?></p>
|
|
|
+ <li class="jobs-list">
|
|
|
+ <div class="jobs-title">
|
|
|
+ <h3><?php the_title(); ?></h3>
|
|
|
+ <p><?php echo $excerpt; ?></p>
|
|
|
+ </div>
|
|
|
+ <div class="jobs-content">
|
|
|
+ <?php echo $content; ?>
|
|
|
+ </div>
|
|
|
</li>
|
|
|
<?php
|
|
|
}
|
|
@@ -109,6 +114,26 @@ get_header();
|
|
|
</div>
|
|
|
<style>
|
|
|
.swiper-wrapper{height:auto;}
|
|
|
+ .jobs-list{
|
|
|
+ border-bottom:1px solid #eee;
|
|
|
+ }
|
|
|
+ .jobs-title{
|
|
|
+ display:flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ background: #f1f1f1;
|
|
|
+ padding: 0 15px;
|
|
|
+ border-radius: 10px;
|
|
|
+ }
|
|
|
+ .jobs-title > p{
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ .jobs-content{
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ .jobs-content p{
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
</style>
|
|
|
<?php get_footer(); ?>
|
|
|
|