Skip to content

ThirteeNov

My personal blog about coding and internet

Menu
  • About me
  • About Zofia Kreasi
  • Cart
  • Checkout
  • Making an airplane game from scratch in Unity
  • My account
  • Privacy Policy
  • Privacy Policy – zkLeaderboard
  • Sample Page
  • Shop
  • Tutorials on Learning JavaScript
  • ZKAccounts – Privacy Policy
Menu

An example how to use WordPress Rest API v2

Posted on June 21, 2024June 21, 2024 by Habibie

In this post I will show you two examples about how to use WordPress Rest API v2 to, for example, get a post content from your website, or any other WordPress sites.

Example 1 – How to get post content by post ID

https://yoursite.com/wp-json/wp/v2/posts?include[]=1234

Make sure you change “yoursite.com” with your actual site domain, and change the “1234” with your intended post ID that you want to get its content.

Example 2 – How to get post content by post slug name

https://yoursite.com/wp-json/wp/v2/posts?slug=your-post-slug

As mentioned before, “yoursite.com” is your target site domain and change the “your-post-slug” with your actual post slug that you want to get its content.

Post Views: 340
ciihuy2020

Welcome!

  • My YouTube Channel
  • My GitHub Page
  • About me

Categories

  • 3DVista
  • Android
  • Apache
  • C#
  • Cordova
  • Electron & Node JS
  • HTML5, CSS & JavaScript
  • iOS
  • Let's Make Unity Games
  • Misc
  • Photoshop
  • PHP
  • Python
  • Uncategorized
  • Unity
  • WordPress

Recent Posts

  • Make objects like wires and cables easily in Unity using Ciihuy Curved Mesh
  • [SOLVED] Can’t Add Custom Domain to Blogger After Losing CNAME Verification
  • iOS App Icon Generator by CiihuyCom
  • Advanced Blinking Marker Script to show objects position in your game canvas
  • Ciihuy Images Merger – Fast & Easy Online Image Combiner
© 2025 ThirteeNov | Powered by Superbs Personal Blog theme