跳到内容

Indesign Nepali Post Date

v6.0.0

InDesign Media · 2026年4月22日 上架

Show your WordPress dates in Bikram Sambat (BS). Shortcodes, PHP helpers, and a settings page.

正在使用
10 以下
评分
暂无
累计下载
580
最近更新
2026年10月18日
需要 WordPress 5.3+已测试到 7.1.5PHP 8.2+

贡献者

截图

Admin: Settings tab (localization, date pattern, wrapper class)
Admin: Settings tab (localization, date pattern, wrapper class)
Admin: Shortcodes tab (copy-ready shortcode reference)
Admin: Shortcodes tab (copy-ready shortcode reference)
Admin: Post Calendar tab (live preview with post-links toggle and accent color picker)
Admin: Post Calendar tab (live preview with post-links toggle and accent color picker)
Admin: Developer tab (PHP function, output filter, and CSS snippet)
Admin: Developer tab (PHP function, output filter, and CSS snippet)
Front-end: Nepali post calendar with clickable day-archive links
Front-end: Nepali post calendar with clickable day-archive links
Front-end: Nepali BS date rendered on a post
Front-end: Nepali BS date rendered on a post

This plugin converts Gregorian (AD) dates into Bikram Sambat (BS) so you can display Nepali dates on posts, pages, widgets, or anywhere in your theme.

Handy if you run a Nepali news site, a blog, or any WordPress site that needs BS dates for the publish date, modified date, or just today’s date.

What it does:

  • Converts any AD date to BS, in Nepali or English digits
  • Nepali month names (e.g. असार) and weekday names (e.g. मंगलबार)
  • Custom date format from the settings page
  • Optional post time display after the BS date – 12-hour or 24-hour format, glyphized when Nepali digits are selected
  • Optional CSS wrapper class if you want to style the output
  • Four shortcodes and a few PHP helpers
  • A monthly BS calendar shortcode with clickable day-archive links and a picker for your brand accent color
  • A filter hook if you want to change the output
  • Covers BS 2000 to 2101 (AD 1943 to 2044)
  • No jQuery, no REST calls, no external dependencies

Features

Shortcodes

  • [indnpd_post_date] Prints the current post’s publish date in BS. Takes optional format, lang, and show_time attributes.
  • [indnpd_today_date] Prints today’s BS date. Good for headers, footers, or widgets. Takes optional format, lang, and show_time attributes.
  • [indnpd_number number=”123″] Converts a number to Nepali glyphs (e.g. 123 to १२३). Takes an optional lang attribute.
  • [indnpd_post_calendar] Shows a monthly BS calendar. Days that have at least one published post link to the day archive. Takes optional year, month, and lang attributes. Prev / next arrows navigate between months.

PHP Functions

Primary names (introduced in 3.0.0):

  • indesign_nepali_post_date_get( $datetime ): Convert a date string or timestamp into a formatted BS string.
  • indesign_nepali_post_date_today(): Return today’s date in BS.
  • indesign_nepali_post_date_convert( $number ): Convert a number to Nepali glyphs.
  • indnpd_get_date( $timestamp, $format, $lang ): Same idea, with format and language you can pass in.

Legacy aliases (kept for backward compatibility, still work exactly the same):

  • id_nepali_post_date_get( $datetime )
  • id_nepali_post_date_today()
  • id_nepali_post_date_convert( $number )

Developer API

  • \IndesignMedia\NPD\Manager::convert( $timestamp, $format, $lang ): Static method if you’d rather not use the global function.
  • indesign_nepali_post_date_output filter: Wrap or modify the HTML before it’s returned.

Date Format Tokens

  • d – Day number
  • m – Month number
  • M – Month name (e.g. असार)
  • y – 2-digit year
  • Y – 4-digit year
  • l – Weekday name (e.g. मंगलबार)

Admin Settings Panel

Four tabs: Settings, Shortcodes, Post Calendar, Developer.

  • Localization Style: Pick Traditional Nepali glyphs (०१२) or English digits (012).
  • Date Pattern: Set a custom format string using the tokens above.
  • CSS Wrapper Class: Optionally wrap every date in <span class="your-class"> so you can style it.
  • Post Time: Toggle to show the publish time after the BS date. Choose 12-hour (3:45 PM) or 24-hour (15:45). Digits follow the Localization Style setting. Can be overridden per shortcode with show_time="1" or show_time="0".
  • Real-time Preview: The preview at the top updates as you change the pattern, switch digits, or toggle the time display.
  • Post Calendar tab: Live preview of the calendar plus two controls that persist to the front-end – a toggle for the day-archive post links and an accent color picker for the weekday header, today’s outline, and linked-day styling.
  • Developer tab: Copy-ready snippets for the PHP function, the output filter, and a starter CSS badge style.

Developers

Built and maintained by Indesign Media (https://indesignmedia.net).

Need help, a custom tweak, or integration work? Head to the plugin page or drop us a line.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums