Join

Unlock the Ability to Categorize Pages

Don't want to mess with code snippets? Request for this to be a feature of MyListing Pro.

Instructions

  1. Create a new PHP code snippet.
  2. Copy the contents of code snippet below.
  3. Paste the contents into your code snippet.
  4. Review any notes that I’ve provided.
  5. Save and enable the code snippet.
  6. Test.

Snippet

By default, WordPress allows you to categorize Posts, but not Pages.

After adding this code snippet to your website, you’ll be able to assign a Category to Pages and a Categories column will be added to the Pages table (/wp-admin/edit.php?post_type=page).

PHP
function add_categories_to_pages()
{
    register_taxonomy_for_object_type("category", "page");
}
add_action("init", "add_categories_to_pages");