anfis_chekhov |
15-02-2013 20:15 2091456 |
Как запихать код счетчика статистики в подвал сайта на wordpress?
Подвал (footer.php):
PHP код:
<?php
/**
* The template for displaying the footer.
*
* Closes the <div> for #content, #content-main and #container, <body> and <html> tags.
*
* @package Graphene
* @since Graphene 1.0
*/
global $graphene_settings;
?>
<?php do_action( 'graphene_bottom_content' ); ?>
</div><!-- #content-main -->
<?php
/* Sidebar 2 on the right side? */
if ( graphene_column_mode() == 'three_col_left' ){
get_sidebar( 'two' );
}
/* Sidebar 1 on the right side? */
if ( in_array( graphene_column_mode(), array( 'two_col_left', 'three_col_left', 'three_col_center' ) ) ){
get_sidebar();
}
?>
<?php do_action( 'graphene_after_content' ); ?>
</div><!-- #content -->
<?php /* Get the footer widget area */ ?>
<?php get_template_part('sidebar', 'footer'); ?>
<?php do_action('graphene_before_footer'); ?>
<div id="footer" class="clearfix">
<?php if ( ! $graphene_settings['hide_copyright'] ) : ?>
<div id="copyright">
<h3><?php _e('Copyright', 'graphene'); ?></h3>
<?php if ( $graphene_settings['copy_text'] == '' && ! $graphene_settings['show_cc'] ) : ?>
<p>
<?php printf( '© %1$s %2$s.', date( 'Y' ), get_bloginfo( 'name' ) ); ?>
</p>
<?php elseif ( ! $graphene_settings['show_cc'] ) : ?>
<?php
if ( ! stristr( $graphene_settings['copy_text'], '</p>' ) ) { $graphene_settings['copy_text'] = wpautop( $graphene_settings['copy_text'] ); }
echo $graphene_settings['copy_text'];
?>
<?php endif; ?>
<?php if ( $graphene_settings['show_cc'] ) : ?>
<?php /* translators: %s will replaced by a link to the Creative Commons licence page, with "Creative Commons Licence" as the link text. */?>
<p>
<?php printf( __( 'Except where otherwise noted, content on this site is licensed under a %s.', 'graphene' ), '<a rel="nofollow" href="/go.php?url=http://creativecommons.org/licenses/by-nc-nd/3.0/">' . __( 'Creative Commons Licence', 'graphene' ) . '</a>' ); ?>
</p>
<p class="cc-logo"><span><?php _e( 'Creative Commons Licence BY-NC-ND', 'graphene' ); ?></span></p>
<?php endif; ?>
<?php do_action('graphene_copyright'); ?>
</div>
<?php endif; ?>
<?php if ( has_nav_menu( 'footer-menu' ) || ! $graphene_settings['hide_return_top'] ) : ?>
<div class="footer-menu-wrap">
<ul id="footer-menu" class="clearfix">
<?php /* Footer menu */
$args = array(
'container' => '',
'fallback_cb' => 'none',
'depth' => 2,
'theme_location' => 'footer-menu',
'items_wrap' => '%3$s'
);
wp_nav_menu(apply_filters('graphene_footer_menu_args', $args));
?>
<?php if ( ! $graphene_settings['hide_return_top'] ) : ?>
<li class="menu-item return-top"><a href="#"><?php _e('Return to top', 'graphene'); ?></a></li>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<?php if ( ! $graphene_settings['disable_credit'] ) : ?>
<div id="developer" class="grid_7">
<?php do_action('graphene_developer'); ?>
</div>
<?php endif; ?>
<?php do_action('graphene_footer'); ?>
</div><!-- #footer -->
<?php do_action('graphene_after_footer'); ?>
</div><!-- #container -->
<?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
</div><!-- .bg-gradient -->
<?php endif; ?>
<?php wp_footer(); ?>
</body>
</html>
Код счетчика:
PHP код:
<!-- HotLog --><script type="text/javascript">
hotlog_r=""+Math.random()+"&s=2274876&im=725&r="+
escape(document.referrer)+"&pg="+escape(window.location.href);
hotlog_r+="&j="+(navigator.javaEnabled()?"Y":"N");
hotlog_r+="&wh="+screen.width+"x"+screen.height+"&px="+
(((navigator.appName.substring(0,3)=="Mic"))?screen.colorDepth:screen.pixelDepth);
hotlog_r+="&js=1.3";
document.write('<a rel="nofollow" href="/go.php?url=http://click.hotlog.ru/?2274876" target="_blank"><img '+
'src="http://hit18.hotlog.ru/cgi-bin/hotlog/count?'+
hotlog_r+'" border="0" width="88" height="31" title="HotLog: показано количество посетителей за сегодня и всего, звезды отражают уровень сайта в рейтинге" alt="HotLog"><\/a>');
</script>
<noscript>
<a rel="nofollow" href="/go.php?url=http://click.hotlog.ru/?2274876" target="_blank"><img
src="http://hit18.hotlog.ru/cgi-bin/hotlog/count?s=2274876&im=725" border="0"
width="88" height="31" title="HotLog: показано количество посетителей за сегодня и всего, звезды отражают уровень сайта в рейтинге" alt="HotLog"></a>
</noscript><!-- /HotLog -->
Хочу помести справа в уголке:
![](http://img521.imageshack.us/img521/1502/thumbrgs.jpg)
|