I’m hooking into ‘edit_form_after_editor’
Check that I am dealing with a custom post type of ‘publications’
Create a number of arguments that I then run in a WP_Query
use that data to do stuff…
Then I want to reset $post
back to how it was, so I run
But $post
stays on the last item I had received from my new WP_Query().
What am I doing wrong? Is there a special way to reset the postdata when dealing with a custom post type?
Update:
At the beginning and end of the function I have:
At the beginning the title is the title for the custom post type I clicked on to edit, or blank if I am creating a new post.
At the end the title is always the last post from my query.
- 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