Skip to content

Instantly share code, notes, and snippets.

Avatar

Shachar Leuchter xeyefex

View GitHub Profile
View CPT_Columns
<?php
//Based on Ohad Raz - https://en.bainternet.info/custom-post-types-columns/
//Some info:
// The classes read the meta field of the CPT ID and enable the sorting
// Is possible remove other column
// Support 4 type of object natively: Title, Thumbnail, Custom taxonomy, Custom Field
// Add a filter cpt_columns_text_{column_name_id} in Title type
// prefix/suffix values are for all the objects except post_thumb
// New features by Mte90: