White Screen of Death
-
I’m looking for a method to sort terms in the order I want, then group posts together under each term. Orderby ID does not work because unfortunately, the terms weren’t added in the order I want to display them in.
I was hoping this plugin would be the answer for me but I can’t seem to get it to work to test to se if it would be the solution for me.
Looking at the support thread use with get_the_terms I tried adding the following function:
function get_the_terms_sort( $terms, $post_id, $taxonomy ) { function cmp_by_custom_order( $a, $b ) { return $a->custom_order - $b->custom_order; } usort( $terms, 'cmp_by_custom_order' ); return $terms; } add_filter( 'get_the_terms', 'get_the_terms_sort', 10, 3 );
Changing the last line to my term ID’s (Is that the correct way to do this?:
add_filter( 'get_the_terms', 'get_the_terms_sort', 145, 147, 149, 150, 148, 146 );
The end result of adding this to functions.php is the page where I’m trying to display these posts by terms in that order is just blank white, and no loops run across my entire site now or some times just a blank white page for every page including the admin.
Running my php plugin in Coda I verified that there are no syntax errors in functions.php, and removing the above code fixes the problem site wide.
Any idea what I am doing wrong / causing this?
- The topic ‘White Screen of Death’ is closed to new replies.