Change post count on tag/terms pages to 10

You’re almost there my friend. Just check with $query->is_tag() rather than only is_tag(). So your updated code will be- function main_query_mods( $query ) { // check http://codex.wordpress.org/Conditional_Tags to play with other queries if(!$query->is_main_query()) { return; } if($query->is_tag()) { $query->set(‘posts_per_page’,10); } } add_action( ‘pre_get_posts’, ‘main_query_mods’ );

wp_set_object_terms not accepting variable array

Ok, so it turned out that my array was an array of strings somehow, which using var_dump (instead of print_r) revealed. Then I needed to convert my array to int values, which I did thus: $myissuearrayINT = array_map(‘intval’, $myissuearray); And now, when I do the following it works as expected: wp_set_object_terms( $myID, $myissuearrayINT, ‘my_issues’, true … Read more