Web Development & WordPress

Shows number of Word Count at the bottom of page or post in wordpress

Without using any plugins if u want to show the number of words used in a page or post at the bottom, you can use the following code in function.php

function  count_words( $content ) {
    $stripped_content = strip_tags( $content );
    $wordnum = str_word_count( $stripped_content );
    $label = __( 'Number of Words', 'wordcount' );
    $content .= sprintf( '<h2>%s:%s</h2>', $label, $wordnum );
    return $content;
}
add_filter( 'the_content', 'count_words' );

Here is the result

Continue reading “Shows number of Word Count at the bottom of page or post in wordpress”
Web Development & WordPress

Macbook air m1: connect to github using terminal

The whole procedure i took help of Claude AI.

First, create a new Personal Access Token:

  • Go to GitHub.com and login
  • Click your profile picture → Settings
  • Scroll down to “Developer settings” (bottom of left sidebar)
  • Click “Personal access tokens” → “Fine-grained tokens”
  • Click “Generate new token”
  • Set a token name: “MacBook Git Token”
  • Set expiration: 90 days (or as you prefer)
  • Under “Repository access”, select “All repositories”
  • Under “Permissions”, expand “Repository permissions” and select:
    • “Contents” → “Read and write”
  • Click “Generate token”
  • COPY THE NEW TOKEN AND SAVE IT SOMEWHERE SAFE
Continue reading “Macbook air m1: connect to github using terminal”
Life Thoughts & Personal Notes

How to remain Calm when someone Praise or Criticise you

When others honor a seeker, they should not attribute it to their own deeds, virtues, or goodness. Instead, they should recognize that the praise reflects the courtesy and generosity of the one offering it. Considering another’s politeness as one’s own merit is not an act of honesty.

Conversely, if someone insults them, they should accept it as a consequence of their own actions, acknowledging that the fault lies within themselves. The insulter bears no blame; rather, they are deserving of compassion, as they unwittingly provide the seeker with an opportunity for purification by enduring the repercussions of the seeker’s misdeeds.

By adopting this mindset, a seeker can remain calm and indifferent to both honor and insult. However, if they perceive honor as a result of their own virtues and insult as another’s fault, they will struggle to maintain tranquility in the face of praise or criticism.

Collected from Gita Press Gorakhpur book Gita Sadhak Sanjivani (English)

Vedic Astrology Insights

Moon in 6th House – Vedic Astrology Meaning, Remedies & Spiritual Insights

Disclaimer: This article is for astrological learning and spiritual research. It does not provide medical or professional advice.

** Thanks to my Guru (Deepanshu Giri) from Lunarastro and Respected Sunil John Sir from Saptarshi Astrology . I will gradually Update it.

Continue reading “Moon in 6th House – Vedic Astrology Meaning, Remedies & Spiritual Insights”
Web Development & WordPress

Install Free SSL to your domain in Hostinger VPS using terminal and SSH

Basically my client’s ssl was expired, he was using hostinger vps and i have helped him to install a new free ssl to his domain ( hosted in vps) using ssh and terminal.
Here are the steps. Just use the codes i shared step by step.

At First login to SSh

Continue reading “Install Free SSL to your domain in Hostinger VPS using terminal and SSH”