share wordpress post on whatsapp without plugin

To share a WordPress post on WhatsApp without using a plugin, follow these steps:

  1. Log in to your WordPress Dashboard:
  2. Navigate to your WordPress website's login page.
  3. Enter your username and password to access the Dashboard.

  4. Open the Post Editor:

  5. From the Dashboard, go to "Posts" and select "All Posts" or click on "Add New" to create a new post.

  6. Edit or Create a Post:

  7. Either choose an existing post or create a new one by adding content, text, and media as needed.

  8. Insert WhatsApp Share Link:

  9. In the post editor, place your cursor where you want to insert the WhatsApp share link.
  10. Switch to the "Text" editor mode.

  11. Add WhatsApp Share Link Code:

  12. Insert the following HTML code to create a WhatsApp share link: html <a href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" target="_blank">Share on WhatsApp</a> This code generates a link that includes the post's permalink as the shared text.

  13. Update or Publish the Post:

  14. Click on "Update" if you are editing an existing post or "Publish" if you are creating a new one.

  15. View the Post:

  16. Visit the published post on your website.

  17. Click on WhatsApp Share Link:

  18. When users click on the "Share on WhatsApp" link, it will open a new window or prompt to share the post on WhatsApp with the post's permalink as the shared text.

Note: Ensure that your WordPress theme supports PHP code in the post editor, and this method may not work properly if your theme doesn't allow PHP code in posts. If that's the case, you may need to consider other solutions or consult with a developer.