web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

wordpress教程:meta标签的各种语法

102 ℃
     
//文章标题
<meta property="og:title" content="<?php the_title(); ?>">
//当前url链接
<meta property="og:url" content="<?php echo get_permalink(); ?>">
//文章描述
<meta property="og:description" content="<?php echo get_the_excerpt(); ?>">
//文章发布时间
<meta property="article:published_time" content="<?php the_time('Y-n-d'); ?>" />
//作者
<meta property="article:author" content="<?php bloginfo('name'); ?>" />
//文章标题
<title><?php the_title(); ?>-
<?php foreach((get_the_category()) as $category){echo $category->cat_name;} ?>-
<?php bloginfo('name'); ?></title>
//文章关键词
<meta name="keywords" content="<?php tagtext();?>" />
//文章描述
<meta name="description" content="<?php echo get_the_excerpt(); ?>" />

tagtext()的用法可以参考wordpress获取Tag标签不带超链接

wordpress做时间列表,比如2024年1月文章列表

wordpress新建页面中页面属性里没有“模板”选项解决方法

wordpress获取当前文章最后一个tags标签(不带链接)

wordpress列表分页自定义(wordpress列表设置最大分页数)

在访问WordPress网站时,网站显示乱码如何解决?

标签: meta标签, wordpress教程

上面是“wordpress教程:meta标签的各种语法”的全面内容,想了解更多关于 wordpress 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_14983.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > wordpress
本文共计661个字,预计阅读时长5分钟
生活小工具,收录了80多款小工具
上一篇: 基于JavaScrip的web动画库——GSAP
下一篇: 免费商用中文字体——优设鲨鱼菲特健康体
x 打工人ai神器