HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/themes/frameMyrskyNew/widget_news.php
<div id="index_news">
<style type="text/css">
.list{
padding:10px 10px 20px 10px;
text-align: left;
background-color : #ededed;
white-space : nowrap;
}
.list li{
list-style : disc none inside;
width: 100%;
position : relative;
white-space : nowrap;
color : #7f7f7f;
margin: 0 10px 0 10px;
font-weight : normal;
}
.list li a{
position : relative;
color : #7f7f7f;
display: block;
padding: 0;
line-height : 25px;
width : 200px;
text-overflow : ellipsis;
display : inline-block;
white-space : nowrap;
height : auto;
vertical-align : middle;
overflow : hidden;
}
.list li span{
position:absolute;
margin:0 10px;
right:5px;
display : inline-block;
height : auto;
}
.list li a:hover{
color: #336699;
}
.index_news_h2{
	padding:0 20px 0 0;
	line-height : 23px;
	margin-bottom : 10px;
	height : 35px;
	color : #0d2a58;
	font-size : 19px;
	vertical-align : middle;
	font-weight : normal;
}
.index_news_h2 a{
	line-height : 17px;
	word-wrap : break-word;
	color : #6fd2dd;
	font-size : 14px;
}
</style>

<div style="width:100%;" >
	<?php  
        $loop_cate_id=array(5,4,3,6); //指定要输出的分类id 
        $num=5;//指定每次循环输出的文章篇数     
     ?> 
    <div class="main-list clearfix" > 
        <?php foreach($loop_cate_id as $key=>$value){ ?> 
        <div id="box-<?php echo $key; ?>" style="width: 100%; float: left;" class="box"> 
            <?php $posts = query_posts($query_string . "&cat={$value}&orderby=date&showposts={$num}" ); ?>  
            <h2 class="index_news_h2">
			<?php single_cat_title(); ?>
			<a style="float: right;" href="<?php echo get_category_link($value); ?>">>>>详细</a></h2>
            <ul class="list"> 
                <?php while(have_posts()) : the_post(); ?> 
                <li ><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
				<?php the_title(); ?></a> <span><?php the_time('y-m-d');?></span>
				</li>
                <?php endwhile; ?> 
            </ul> 
        </div> 
		<div style="width:1%; float:left;">&nbsp;</div>
        <?php }?> 
    </div>
</div>
</div>