I am having trouble debugging a situation, and I think some better background information on how these systems work would be very helpful. I know that the use of the function
query_posts is strongly discouraged. But let's just assume that there is nothing I can do to remove it from the code. Specifically the query is changed to pull posts of a post_type (a
post_type specific to the theme I am using). This is what the query looks like after it has been changed:
Then the loop begins and it can successfully grab the titles for each post. But when I call
get_the_category it returns an empty array, even though all of the posts have categories. I verified that it was an empty array with
I do not have a strong understanding of how these systems work, so the emphasis on not using
query_posts has me worried. Is there any possible interaction between
get_the_category that could cause it to not work correctly?