How to display current Nepali date in WordPress?
With the drastic rising of Nepali news portal and blogging websites in Nepal, usage of Nepali Date is common in most of the sites. Hence,WordPress CMS usage is rising in incremental graphs because of simplicity and ease of use.
In most news portal, you can see the Nepali Date appearing either on the top of the page or on the single news post on your WordPress news portal or blogging websites.
In most tutorials, you can see people implementing outdated code or lengthy steps to generate traffic or revenue to display Nepali date but I don’t prefer length steps neither I have implemented any advertisements.
Please follow the instruction carefully to display the current Nepali date in your WordPress Website.
- Create a new folder named “inc” and inside it, new file called “nep_calendar.php” inside your theme folder and insert the following code.[gist id=”1dc0fbde2556bfdc036e1a9fa9e893e8″ file=”nep_calendar.php”]
- Include or map the file in functions.php as belows,
[gist id=”1dc0fbde2556bfdc036e1a9fa9e893e8″ file=”functions.php”] - Insert the following php code where you want to display Current Nepali date
[gist id=”1dc0fbde2556bfdc036e1a9fa9e893e8″ file=”display-nepali-date.php”]
Leave a Reply
You must be logged in to post a comment.