Snow's Blog
记录朝花夕拾的日子

DUX主题增加说说--更新

更新说说的图片文件:
<--<img src="https://www.snowing.ltd/wp-content/uploads/2018/10/snow.jpg" class="avatar avatar-48" width="48" height="48">-->
<?php echo get_avatar( get_the_author_meta( 'user_email' ) ); ?>

第一行代码是自定义图片位置,第二行代码是默认图片位置(即个人头像)

完整代码如下:

<?php 
/* Template Name: 说说/心情 */
    get_header(); 
?>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/css/vertical_timeline.css" />
<section class="container">
<div class="content-wrap">
<div class="content">
	<div style="background: #FFF; padding: 30px; border-radius: 5px;">
		<ul class="cbp_tmtimeline">
			<?php 
			query_posts("post_type=shuoshuo & post_status=publish & posts_per_page=-1");
			if ( have_posts() ) { 
				while ( have_posts() ) { 
					the_post(); ?>
					<li>
						<time class="cbp_tmtime"><i class="fa fa-clock-o"></i>    <?php the_time('Y年n月j日G:i'); ?></time>
						<div class="cbp_tmicon">
							<img src="https://www.snowing.ltd/wp-content/uploads/2018/10/snow.jpg" class="avatar avatar-48" width="48" height="48">
							

						</div>
						<div class="cbp_tmlabel" >
							<span style="font-size:14px;"><?php the_content(); ?></span>
							<h2><?php the_title(); ?><span><?php echo get_bloginfo('name'); ?>  |  <?php echo get_bloginfo('description' ); ?></span></h2>
						</div>
					</li>
				<?php }
			} ?>
		</ul>
	</div>
</div>	
</div>
	<?php get_sidebar(); ?>
</section>
	<?php get_footer();?>
赞(0) 打赏
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《DUX主题增加说说--更新》
文章链接:https://www.snowing.cc/588.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

登录

找回密码

注册