//Make changes to wppp.php version 1.3.4 and in this order for line numbers to be accurate //LINE 20 - ADD AFTER: ,'title_length' => '0' ,'by_category' => '0' //LINE 61 - REPLACE: $howmany *= 2; $howmany *= 5; //LINE 87 STARTS WITH: $results = $wpdb->get_results(" //CONTINUES TILL 94 WHICH ENDS WITH: } REPLACE WITH: //RobMalon.com category hack $currentcat = $WPPP_defaults['by_category']; //Checks and toggle default query usage if (is_numeric($opzioni['by_category']) && $opzioni['by_category'] > 0) { $results = $wpdb->get_results("SELECT * FROM {$wpdb->posts} p LEFT OUTER JOIN wp_term_relationships r ON r.object_id = p.ID LEFT OUTER JOIN wp_terms t ON t.term_id = r.term_taxonomy_id WHERE p.id IN (" . implode(',', $id_list) . ") AND p.post_type = '" . ( $opzioni['show'] == 'pages' ? 'page' : 'post' ) . "' AND t.term_id = '" . $opzioni['by_category'] . "'"); } else { //note ID changed to upper case $results = $wpdb->get_results("SELECT ID FROM {$wpdb->posts} WHERE id IN (" . implode(',', $id_list) . ") AND post_type = '" . ( $opzioni['show'] == 'pages' ? 'page' : 'post' ) . "'"); } $valid_list = array(); foreach ( $results as $valid ) { $valid_list[] = $valid->ID; //note ID changed to upper case } //LINE 209 - ADD AFTER: $opzioni['title_length'] = $opzioni['title_length'] !== NULL ? $opzioni['title_length'] : $WPPP_defaults['title_length']; $opzioni['by_category'] = $opzioni['by_category'] !== NULL ? $opzioni['by_category'] : $WPPP_defaults['by_category'];