WordPress custom routes for single posts

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com

I created a custom route in my wordpress website. So basically I have 2 wordpress sites a big blog and a smaller one which will grab the blogs from the big one via API.

I got all the posts from the big blog and now I want to create a routing /blog/post-name and I used the following class for it.

And I have created a blogs.php file in my theme, the file now it’s very simple as I want to grab the permalink and based on it I’ll make requests to the API to grab the post content. However, when I print_r (get_permalink()) I get the permalink as Hello World on any permalinks I go, if I go to /blog/test-post/ or /blog/new-post it will still show me Hello World.

What do I do wrong?

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com