首页 wpog协议

wpog协议

沐辰客栈 2022-04-04 09:03:38 0 170
<meta property="og:type" content="article" />
<meta property="og:locale" content="zh-CN" />
<!--页面所在的网站名-->
<meta property="og:site_name" content="<?php bloginfo('name'); ?>">
<!--文章标题-->
<meta property="og:title" content="<?php the_title(); ?>" />
<!--作者名称-->
<meta property="og:author" content="<?php echo _qzdy('zero-footer-txxnc');?>" />
<!--略缩图地址-->
<meta property="og:image" content="<?php $gettesheimg = wp_get_attachment_image_src( get_post_thumbnail_id());if(!empty($gettesheimg)){echo $gettesheimg[0];}else{echo catch_first_image(); }?>" />
<!--页面地址-->
<meta property="og:url" content="<?php echo get_permalink(); ?>">
<!--分类名-->
<meta property="og:category" content="<?php foreach((get_the_category()) as $category){echo $category->cat_name;} ?>">
<!--关键词-->
<meta property="og:tag" content="<?php og_tag();?>">
<!--描述-->
<meta property="og:description" content="<?php og_description();?>" />
<meta property="og:release_date" content="<?php the_time('Y年n月j日'); ?>" />

发表评论