Title: Current Year Shortcode (for Post Titles)
Author: wcdev
Published: <strong>2022 年 6 月 17 日</strong>
Last modified: 2024 年 3 月 19 日

---

搜索插件

![](https://ps.w.org/current-year-shortcode-for-post-titles/assets/banner-772x250.
png?rev=2743911)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/current-year-shortcode-for-post-titles/assets/icon-256x256.
png?rev=2743911)

# Current Year Shortcode (for Post Titles)

 作者：[wcdev](https://profiles.wordpress.org/wcdev/)

[下载](https://downloads.wordpress.org/plugin/current-year-shortcode-for-post-titles.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/current-year-shortcode-for-post-titles/#description)
 * [评价](https://cn.wordpress.org/plugins/current-year-shortcode-for-post-titles/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/current-year-shortcode-for-post-titles/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/current-year-shortcode-for-post-titles/#developers)

 [支持](https://wordpress.org/support/plugin/current-year-shortcode-for-post-titles/)

## 描述

The shortcode [wcyear] will display the current year. You can place this shortcode
anywhere in your WordPress site.

IMPORTANT: If you want to place this shortcode in post and page titles, go the plugin
settings to check “Enable Shortcode in titles”.

If you use Yoast SEO, you can enable the relevant setting for the shortcode to work
with Yoast SEO plugin. For other SEO plugins, you should use their inbuilt dynamic
tags to diplay the current year.

NOTE: It’s best to use the dynamic tags that come with SEO plugins for displaying
current year in meta titles.

## 安装

 1. Upload the plugin folder to your /wp-content/plugins/ folder.
 2. Go to the **Plugins** page and activate the plugin.
 3. Go the plugins settings page (Settings > Current Year Shortcode (for Post Titles))
    and enable the required options.
 4. Place the shortcode anywhere (Title, Content, Footer) you want to display the year.

## 常见问题

### How do I use this plugin?

Add “[wcyear]” shortcode where you want to show the current year.

### Why does the shortcode not work in titles?

Make sure you have enabled the relevant settings in the “Current Year Shortcode (
for Post Titles)” settings page (It is under the Settings menu).

### Why the shortcode does not work in meta title?

This could be because your meta title is being generated by a third-party SEO plugin
like Yoast SEO, All-in-one SEO, or Rank math. This plugin has an option to enable
shortcode in Yoast SEO. For other plugins, please check if they have any option 
in their settings page to enable shortcodes (All-in-one SEO does), or just use their
in-built dynamic tags like %current_year% etc…

### How to uninstall the plugin?

Simply deactivate and delete the plugin.

## 评价

此插件暂无评价。

## 贡献者及开发者

「Current Year Shortcode (for Post Titles)」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ wcdev ](https://profiles.wordpress.org/wcdev/)

[帮助将「Current Year Shortcode (for Post Titles)」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/current-year-shortcode-for-post-titles)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/current-year-shortcode-for-post-titles/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/current-year-shortcode-for-post-titles/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/current-year-shortcode-for-post-titles/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/current-year-shortcode-for-post-titles/)。

## 更新日志

#### 1.0

 * Plugin released.

## 额外信息

 *  版本 **1.1**
 *  最后更新：**2 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 5.5 或更高版本 **
 *  已测试的最高版本为 **6.4.8**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/current-year-shortcode-for-post-titles/)
 * 标签
 * [current year shortcode](https://cn.wordpress.org/plugins/tags/current-year-shortcode/)
 *  [高级视图](https://cn.wordpress.org/plugins/current-year-shortcode-for-post-titles/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/current-year-shortcode-for-post-titles/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/current-year-shortcode-for-post-titles/reviews/)

## 贡献者

 *   [ wcdev ](https://profiles.wordpress.org/wcdev/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/current-year-shortcode-for-post-titles/)