Перейти к содержимому
WordPress.org

Русский

  • Темы
  • Плагины
  • Новости
    • Документация
    • Форумы
  • О WordPress
  • Сообщество
  • Скачать WordPress
Скачать WordPress
WordPress.org

Plugin Directory

Current Post Shortcode

  • Отправить плагин
  • Мои избранные
  • Войти
  • Отправить плагин
  • Мои избранные
  • Войти

Current Post Shortcode

Автор: Md Forid Uddin
Скачать
  • Детали
  • Отзывы
  • Установка
  • Разработка
Поддержка

Описание

The «Current Post Shortcode» plugin allows you to display post titles and custom field values using simple shortcodes. You can display the current post’s title or meta information, or specify a post ID to retrieve data from a specific post.

Display Current Post Title and Meta Information:

  • Post Title: [current_post] → Outputs the current post title, e.g., «Hello World»
  • Post Meta (Custom Field): [current_post meta="custom_field"] → Outputs the value of the custom field

Display Data from a Specific Post ID:

  • Post Title: [current_post id="123"] → Outputs the title of the post with ID «123»
  • Post Meta (Custom Field): [current_post id="123" meta="custom_field"] → Outputs the value of the custom field in the post with ID «123»

Display Fallback Meta Value:

[current_post meta="custom_field" default="Default Value"]  → Displays "Default Value" if the custom field is empty

Display Default Value for Zero Meta Value:

[current_post meta="custom_field" default="Default Value" skip="true"]  → Displays "Default Value" if the custom field value is zero

Установка

From your WordPress dashboard:

  • Go to Plugins > Add New.
  • Search for ‘Current Post Shortcode’.
  • Click «Install Now», then «Activate Plugin».

Or **install it manually**:

  • Download the plugin ZIP file from WordPress Directory.
  • Log in to your WordPress Dashboard, navigate to Plugins > Add New, and click the «Upload Plugin» button.
  • Choose the plugin ZIP file and click «Install Now».
  • After installation, click «Activate Plugin».

Часто задаваемые вопросы

How do I use the shortcodes?

  • Use [current_post] to display the title of the current post.
  • Use [current_post meta="custom_field"] to display a custom field value.
  • To display data from a specific post, use the id attribute.

Can I use this shortcode in widgets or other areas of the site?

Yes, you can use these shortcodes anywhere shortcodes are supported in WordPress, such as posts, pages, widgets, Gutenberg blocks, and page builders like Elementor, Divi, WPBakery, etc.

How do I handle empty or zero meta values?

You can use the skip attribute to skip empty or zero values and optionally display a default value.

Is there a fallback for meta values?

Yes, you can use the default attribute to provide a fallback value for empty meta values.

Отзывы

Нет отзывов об этом плагине.

Участники и разработчики

«Current Post Shortcode» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники
  • Md Forid Uddin

Перевести «Current Post Shortcode» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

3.1.0 — 14/01/2026

  • Added Shortcode functionality for displaying current post information.
  • Added support for displaying meta values with fallback options.

3.0.0 — 13/01/2026

  • Improved shortcode functionality to support additional attributes.
  • Enhanced compatibility with the latest WordPress versions.
  • Added fallback meta value for better user experience.

1.0.0 — 11/03/2025

  • Initial release of the plugin.

Мета

  • Версия 3.1.0
  • Обновление: 4 месяца назад
  • Активных установок: 40+
  • Версия WordPress 6.7 или выше
  • Совместим вплоть до: 6.9.4
  • Версия PHP 7.4 или выше
  • Язык
    English (US)
  • Метки:
    custom fieldpost metapost titleshortcode
  • Дополнительно

Оценки

Пока что нет ни одного отзыва.

Your review

Посмотреть всеотзывы

Участники

  • Md Forid Uddin

Поддержка

Есть что сказать? Нужна помощь?

Перейти в форум поддержки

  • О нас
  • Новости
  • Хостинг
  • Приватность
  • Витрина
  • Темы
  • Плагины
  • Паттерны
  • Обучение
  • Поддержка
  • Разработчики
  • WordPress.TV ↗
  • Присоединиться
  • События
  • Поддержать ↗
  • Пять для будущего
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Русский

  • Посетите нас в X (ранее Twitter)
  • Посетите нашу учётную запись в Bluesky
  • Посетите нашу ленту в Mastodon
  • Посетите нашу учётную запись в Threads
  • Посетите нашу страницу на Facebook
  • Посетите наш Instagram
  • Посетите нашу страницу в LinkedIn
  • Посетите нашу учётную запись в TikTok
  • Посетите наш канал YouTube
  • Посетите нашу учётную запись в Tumblr
Код — это поэзия.
The WordPress® trademark is the intellectual property of the WordPress Foundation.