
懂php的高手或者玩wordpress的朋友前来帮忙,修改下代码
本人刚刚接触到wordpress做了个博客,没玩过PHP的系统好多代码都看不懂,呵呵asp还能看懂点本人学生由于专业不是这个没有深入学习这些那位帮帮忙把下面的一段代码修改...
本人刚刚接触到wordpress做了个博客,没玩过PHP的系统 好多代码都看不懂,呵呵 asp还能看懂点 本人学生由于专业不是这个没有深入学习这些 那位帮帮忙 把下面的 一段代码修改一下
<div class="anchor">
<span><a href="#" onclick="MGJS.goTop();return false;"><?php _e('TOP', 'elegantbox'); ?></a></span>
</div>
<div class="fixed"></div>
</div>
<div class="fixed"></div>
</div>
</div>
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<?php
global $wpdb;
$post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970"));
if ($post_datetimes) {
$firstpost_year = $post_datetimes->firstyear;
$lastpost_year = $post_datetimes->lastyear;
$copyright = __('Copyright © ', 'elegantbox') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
bloginfo('name');
}
printf(__(' | Powered by <a href="%1$s">WordPress</a>', 'elegantbox'), 'http://wordpress.org/');
printf(__(' | Theme by <a href="%1$s">NeoEase</a>', 'elegantbox'), 'http://www.neoease.com/');
?>
</p>
<ul id="admin">
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
</ul>
<div class="fixed"></div>
</div>
</div>
</div>
<!-- footer END -->
<?php
wp_footer();
$options = get_option('elegantbox_options');
if ($options['analytics']) {
echo($options['analytics_content']);
}
?>
</body>
</html>
这是我的wordpress主题的页脚代码 我要添加自己的备案号文字信息 和 网站统计 如何完成
晕了 按照下面yyjjssn的方法我添加了信息 结果汉字都显示不出来啊 郁闷中 展开
<div class="anchor">
<span><a href="#" onclick="MGJS.goTop();return false;"><?php _e('TOP', 'elegantbox'); ?></a></span>
</div>
<div class="fixed"></div>
</div>
<div class="fixed"></div>
</div>
</div>
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<?php
global $wpdb;
$post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970"));
if ($post_datetimes) {
$firstpost_year = $post_datetimes->firstyear;
$lastpost_year = $post_datetimes->lastyear;
$copyright = __('Copyright © ', 'elegantbox') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
bloginfo('name');
}
printf(__(' | Powered by <a href="%1$s">WordPress</a>', 'elegantbox'), 'http://wordpress.org/');
printf(__(' | Theme by <a href="%1$s">NeoEase</a>', 'elegantbox'), 'http://www.neoease.com/');
?>
</p>
<ul id="admin">
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
</ul>
<div class="fixed"></div>
</div>
</div>
</div>
<!-- footer END -->
<?php
wp_footer();
$options = get_option('elegantbox_options');
if ($options['analytics']) {
echo($options['analytics_content']);
}
?>
</body>
</html>
这是我的wordpress主题的页脚代码 我要添加自己的备案号文字信息 和 网站统计 如何完成
晕了 按照下面yyjjssn的方法我添加了信息 结果汉字都显示不出来啊 郁闷中 展开
2个回答
展开全部
<div class="anchor">
<span><a href="#" onclick="MGJS.goTop();return false;"><?php _e('TOP', 'elegantbox'); ?></a></span>
</div>
<div class="fixed"></div>
</div>
<div class="fixed"></div>
</div>
</div>
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<?php
global $wpdb;
$post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970"));
if ($post_datetimes) {
$firstpost_year = $post_datetimes->firstyear;
$lastpost_year = $post_datetimes->lastyear;
$copyright = __('Copyright © ', 'elegantbox') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
bloginfo('name');
}
printf(__(' | Powered by <a href="%1$s">WordPress</a>', 'elegantbox'), 'http://wordpress.org/');
printf(__(' | Theme by <a href="%1$s">NeoEase</a>', 'elegantbox'), 'http://www.neoease.com/');
?><br /><a href="http://www.miibeian.gov.cn" target="_blank">【这里替换成备案号】</a>
【 这里替换成统计代码(应为<script>.......</script>的样子) 】
</p>
<ul id="admin">
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
</ul>
<div class="fixed"></div>
</div>
</div>
</div>
<!-- footer END -->
<?php
wp_footer();
$options = get_option('elegantbox_options');
if ($options['analytics']) {
echo($options['analytics_content']);
}
?>
</body>
</html>
【最后另存为(不是保存),“文件名”不变,在“编码”选择“UTF-8”,保存覆盖原文件】
<span><a href="#" onclick="MGJS.goTop();return false;"><?php _e('TOP', 'elegantbox'); ?></a></span>
</div>
<div class="fixed"></div>
</div>
<div class="fixed"></div>
</div>
</div>
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<?php
global $wpdb;
$post_datetimes = $wpdb->get_row($wpdb->prepare("SELECT YEAR(min(post_date_gmt)) AS firstyear, YEAR(max(post_date_gmt)) AS lastyear FROM $wpdb->posts WHERE post_date_gmt > 1970"));
if ($post_datetimes) {
$firstpost_year = $post_datetimes->firstyear;
$lastpost_year = $post_datetimes->lastyear;
$copyright = __('Copyright © ', 'elegantbox') . $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo $copyright;
bloginfo('name');
}
printf(__(' | Powered by <a href="%1$s">WordPress</a>', 'elegantbox'), 'http://wordpress.org/');
printf(__(' | Theme by <a href="%1$s">NeoEase</a>', 'elegantbox'), 'http://www.neoease.com/');
?><br /><a href="http://www.miibeian.gov.cn" target="_blank">【这里替换成备案号】</a>
【 这里替换成统计代码(应为<script>.......</script>的样子) 】
</p>
<ul id="admin">
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
</ul>
<div class="fixed"></div>
</div>
</div>
</div>
<!-- footer END -->
<?php
wp_footer();
$options = get_option('elegantbox_options');
if ($options['analytics']) {
echo($options['analytics_content']);
}
?>
</body>
</html>
【最后另存为(不是保存),“文件名”不变,在“编码”选择“UTF-8”,保存覆盖原文件】
参考资料: http://ololi.com
展开全部
你可以直接在这些代码的下面加上你要的信息:
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
如:
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<p>YY网:www.yyjjssnn.cn</p>
<p>这里是备案信息</p>
这样就可以了,原来的那些代码都是WordPress的广告代码,你可以删除,当然版权所有,还是留一个链接得好.
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
如:
<!-- footer START -->
<div id="footer">
<div class="inner">
<div class="content">
<p id="about">
<p>YY网:www.yyjjssnn.cn</p>
<p>这里是备案信息</p>
这样就可以了,原来的那些代码都是WordPress的广告代码,你可以删除,当然版权所有,还是留一个链接得好.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询