Dec-06-2020, 06:38 AM
word_list is only defined within the for loop. If get_posts is empty, the loop is not run.
If there were posts, the filtered_words1 assignment would only be using the word_list that was set on the last iteration of the loop. The earlier posts wouldn't contribute. That seems incorrect to me.
As the word_list construction relies only on title_list, I think it needs to be moved outside the loop.
If there were posts, the filtered_words1 assignment would only be using the word_list that was set on the last iteration of the loop. The earlier posts wouldn't contribute. That seems incorrect to me.
As the word_list construction relies only on title_list, I think it needs to be moved outside the loop.