我正在尝试帮助一位朋友的wordpress。问题是,我几乎完全不了解php的工作方式。我没有编写此代码,但是由于我对html和css有基本的了解,因此我尝试对其进行修复,但仍然没有成功。
结果是:。版权所有©2015 AABB。版权所有。
但我要:版权所有©2015 AABB。版权所有。
如果我删除:
Copyright ©
<?php echo date("Y")." "; ?>
<?php bloginfo('name')." "; ?>.
All Rights Reserved.
页脚上不会显示任何版权。
代码如下:
<?php
/**
* The template for displaying the footer.
*
* @package WordPress
* @subpackage Perfekto
* @since Perfekto 1.0
*/
?>
</div><!-- end .pad_container -->
<div class="pagination-bg"></div>
<div class="pagination-bottom"></div>
<div id="footer">
<div id="foot-full">
<?php get_sidebar('footerfull');?>
</div><!-- end #footfull -->
<div id="foot-full2">
<?php get_sidebar('footerfull2');?>
</div><!-- end #foot-full2 -->
<div id="foot-col1">
<?php get_sidebar('footer1');?>
</div><!-- end #foot-col1 -->
<div id="foot-col2">
<?php get_sidebar('footer2');?>
</div><!-- end #foot-col2 -->
<div id="foot-col3">
<?php get_sidebar('footer3');?>
</div><!-- end #foot-col3 -->
<div class="clear"></div>
</div><!-- end #footer -->
<div id="footer-copyright">
<div id="copyright">
<?php /* $foot= stripslashes(get_option('templatesquare_footer')) */ ?>
<?php /* if($foot==""){ */?>
<?php /* _e('Copyright', 'templatesquare'); */ ?> <!-- © -->
<?php /* bloginfo( 'name' ); */ ?></a>;
<?php
/*
global $wpdb;
$post_datetimes = $wpdb->get_results("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[0]->firstyear;
$lastpost_year = $post_datetimes[0]->lastyear;
$copyright = $firstpost_year;
if($firstpost_year != $lastpost_year) {
$copyright .= '-'. $lastpost_year;
}
$copyright .= ' ';
echo '<a href="'.home_url( '/').'">'.get_bloginfo('name') .'</a>';
}
*/
?>. <?php /* _e('All rights reserved.', 'templatesquare'); */ ?>
<?php /* }else{ */ ?>
<?php /* echo $foot; */ ?>
<?php /* } */ ?>
Copyright ©
<?php echo date("Y")." "; ?>
<?php bloginfo('name')." "; ?>.
All Rights Reserved.
</div>
<div id="footermenu">
<?php wp_nav_menu( array(
'container' => 'ul',
'menu_class' => '',
'menu_id' => '',
'depth' => 1,
'sort_column' => 'menu_order',
'theme_location' => 'footmenu'
));
?>
</div>
</div><!-- end #footer-copyright -->
</div><!-- end #container -->
</div><!-- end #frame -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31480559-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript"> Cufon.now();</script> <!-- to fix cufon problems in IE browser -->
<?php
wp_footer();
?>
<?php $google = stripslashes(get_option('templatesquare_google'));?>
<?php if($google=="false"){?>
<?php }else{?>
<?php echo $google; ?>
<?php } ?>
</body>
</html>
您到处都有随机标点,这导致了问题。
<?php /* bloginfo( 'name' ); */ ?></a>;
^----here
?>. <?php /* _e('All rights reserved.', 'templatesquare'); */ ?>
^----and here
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句