Advertisement
duck__boy1981

Custom Taxonomy Sort amendments

Dec 2nd, 2011
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. /**
  2.  * Change the 'column_value()' function to this to fix filter conflicts.
  3.  */
  4. function column_value($column_values, $custom_column, $term_id)
  5. {
  6.     echo $column_values; // Echo the current values for custom columns, otherwise they will all be lost.
  7.    
  8.     if($custom_column === 'order') : // Check that this column is the 'order' column, otherwise all other values will be over-written.
  9.         return get_term_meta($term_id, 'tax-order', true);
  10.     endif;
  11. }
  12.  
  13. /**
  14.  * Add this to the CSS so that the column is not unnecessarally wide.
  15.  */
  16. th.column-order, td.column-order, #order{
  17.     text-align: center;
  18.     width: 50px;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement