Last active
September 3, 2018 06:59
-
-
Save talentedaamer/1646503a5680a546a6e0db9d60523201 to your computer and use it in GitHub Desktop.
add custom column to taxonomy (carousel_category) list table page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* filter pattern: manage_edit-{taxonomy}_columns | |
* where {taxonomy} is the name of taxonomy e.g; 'carousel_category' | |
* codex ref: https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$taxonomy_id_columns | |
*/ | |
add_filter( 'manage_edit-carousel_category_columns' , 'wptc_carousel_category_columns' ); | |
function wptc_carousel_category_columns( $columns ) { | |
// remove slug column | |
unset($columns['slug']); | |
// add carousel shortcode column | |
$columns['carousel_shortcode'] = __('Carousel Shortcode'); | |
return $columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment