wordpress

使用

Crayon Syntax Highlighter插件

<pre>粘贴code在这里</pre>

 

数据库备份和恢复

mysqldump -u root -p mytest > mytest.sql

mysql -u root -p mytest < mytest.sql

 

删掉关于标题,在twentytwelve/content-page.php中,删掉一下代码

<header class="entry-header">
			<?php if ( ! is_page_template( 'page-templates/front-page.php' ) ) : ?>
			<?php the_post_thumbnail(); ?>
			<?php endif; ?>
			<h1 class="entry-title"><?php the_title(); ?></h1>

		</header>

 

在twentytwelve/header.php中加入红色代码,注意放其他位置会导致布局变形,不知为啥。

 <head>

<meta charset="<?php bloginfo( 'charset' ); ?>" />

<link rel="stylesheet" href="http://www.xxx.com/stackedit/public/res-min/themes/base.css"/>

<meta name="viewport" content="width=device-width" />

<title><?php wp_title( '|', true, 'right' ); ?></title>

<link rel="profile" href="http://gmpg.org/xfn/11" />

<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>

<!--[if lt IE 9]>

<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>

<![endif]-->

<?php wp_head(); ?>

</head>

 

在twentytwelve/content.php中把这段代码删,就可以把摘要中那个碍眼的评论去掉。

<?php if ( comments_open() ) : ?>
				<div class="comments-link">
					<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
				</div><!-- .comments-link -->
			<?php endif; // comments_open() ?>

 

在twentytwelve/footer.php中把footer的代码改成,就可以改掉原版的那句土话了,顺便加上copyright。

<footer id="colophon" role="contentinfo">
		<div class="site-info">
			<?php do_action( 'twentytwelve_credits' ); ?>
<p>Copyright © 2013-2014</p>
		</div><!-- .site-info -->
	</footer>

 

去除“您可以使用这些HTML标签和属性:”的方法,

 在wp-includes/comment-template.php寻找代码<?php echo $args['comment_notes_after']; ?>,并删了。

 

主页只显示摘要:

在twentytwelve/content.php中增加红色代码

<?php if ( is_search() || is_home()) : // Only display Excerpts for Search ?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值