I am creating a plugin for a theme am using the theme has multiple fields and i field them all using both custom data and fields.
But i am missing something, the plugin creates multiple posts using wp_insert_post Function
but only 1 or upto 3 posts will display in the theme, and if i click update to 1 post on the wordpress editor all the posts show at once as if fixed but there is no additional fields added to the posts meta fields so am confused.
I checked the cache, also when i disable the theme and enable it again all the posts show up so where is the issue coming from and how do i fix this.
Please Help, much appreciated.
After a Long Struggle i had to read the theme Structure and how it displays its posts and inserts them and found that they have been submitting the posts id's in a file.
So how it works is
when you load the post page the theme requests for posts from file it checks if file exists and time last updated and if time last updated post in database and time last updated file are the same it displays the post id's inside the file.
Conditional Else it updates the file and add the posts id's currently in the database inside the file.
So basically the theme doesn't sort posts directly from the database but file So?
I changed the theme display and make it request Directly from database.
I can't believe it's a very popular theme with a messy code structure.
Well that's all hope it helps those who face same problem.
Else you can ask in this thread i will help if i am able to i am not expert but have been coding for 4 years and still get frustrating bugs like this and it could be that i am impatient eitherway, Jaa :)