In my account page I have some PHP logic going on along with update_user_meta
. The status of the user meta depends on what the page will display.
The problem is that page refreshes before the user_meta
get updated, so currently I’m refreshing page twice with JavaScript.
Also I have a dashboard widget that has similar functionality, meaning, it displays or not depending on the user_meta
content. In the dashboards, however, the page waits for database to refresh (that’s my hypothesis) and I don’t have to refresh the page twice to get desired result, meaning display the widget’s content based on updated user_meta
.
So my question is, how can I make it work in my account page, or in any WordPress page like it works in the dashboard.
I’m not using AJAX, also I’m “refreshing” the page on form submit. I know this not ideal workflow, but it’s what I’ve got.
Any help in this matter is much appreciated.
- 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