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?
- 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