/** * header 的keyword,descript 等SEO meta 标签 * * @version 1.1 * @author Jeff ~ DeveWork.com * */ function mindia_head_meta() { global $post; if (is_home()) { $keywords = beve_option('dw_keywords', ''); $description = beve_option('dw_description', ''); } elseif (is_category()) { $description = strip_tags(trim(category_description())); $keywords = single_cat_title('', false); } elseif (is_single()) { if ($post->post_excerpt) { $description = $post->post_excerpt; } else { $description = utf8Substr(strip_tags($post->post_content), 0, 120); $description = str_replace("\r\n", "", $description); $description = str_replace("\n", "", $description); $description = str_replace("\"", "'", $description); $description .= '...'; } $keywords = ""; $tags = wp_get_post_tags($post->ID); foreach ($tags as $tag) { $keywords = $keywords . $tag->name . ", "; } } ?> <meta name="keywords" content="<?php echo $keywords; ?> " /> <meta name="description" content="<?php echo $description; ?> " /> <?php if (function_exists('get_query_var')) { $cpage = intval(get_query_var('cpage')); if (!empty($cpage)) { echo '<meta name="robots" content="noindex, nofollow" />'; } } }
<?php if (!defined('ABSPATH')) { exit; } $minilogo = beve_option('dw_minilogo', ''); $logo = beve_option('dw_logo', ''); ?> <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <!--fuckbaidu --> <?php if (empty($minilogo)) { ?> <link rel="shortcut icon" href="<?php echo home_url(); ?> /favicon.ico" type="image/x-icon" /> <?php } else { ?> <link rel="shortcut icon" href="<?php echo $minilogo; ?> " type="image/x-icon" /> <?php }
</div><!-- .float_left --> <div class="float_right"> <?php if (beve_option('md_wechat')) { ?> <div class="weixin"><img src="<?php echo $md_wechat_img; ?> " alt="微信"><span>微信</span></div><?php } ?> <div class="about"> <?php echo beve_option('dw_footertext1'); ?> <?php echo beve_option('dw_footertext2'); ?> </div> <div class="cpright"></div> </div> <!-- .float_right --> </div> <!-- .f-content --> <div class="back-top"> <a href="#" id="goTop">回到顶部</a> </div> <?php dw_footer(); ?> </body> </html>
</span><?php } ?> </div> <!-- .stat --> </div> <!-- .info --> </div><!-- single.meta --> </div><!-- .title --> <section class="entry clearfix"> <?php if (beve_option('dw_singlefigur')) { ?> <div class="aligncenter"> <img src="<?php beve_post_img_url(); ?> "> </div><!-- . --> <?php } ?> <?php the_content(''); ?>