Get template part using a custom taxonomy term June 12, 2022 by Tarik Billa leanda reports that the problem has been resolved: Solved it by changing array_pop to array_shift.