Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. chris-castillo-dev created this gist Mar 24, 2024.
    15 changes: 15 additions & 0 deletions simple-page-attributes-taxonomy.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    function add_page_attributes_taxonomy() {
    $args = array(
    'label' => __( 'Page Attributes', 'textdomain' ),
    'public' => false,
    'rewrite' => false,
    'hierarchical' => false,
    'show_ui' => true,
    'show_in_quick_edit' => true, // Added this line to show in Quick Edit
    'show_admin_column' => true,
    );

    register_taxonomy( 'page_attributes', 'page', $args );
    }

    add_action( 'init', 'add_page_attributes_taxonomy' );