Installed Forca Theme, wonder how I can alter Post editing screen

I've just installed Forca Theme on my fresh WP installation.

They add a few custom taxonomies like:

1 Events Categories - Just categories for Events

2 Events - Same as regular Post, with custom behaviour and template, have assigned Events Categories to it

3 Events Page - Lists ALL Events, no possibility to display from particular Events Category because the Event Page is not associated with ANY Category, it's the Events (Items) themselves that are assigned to categories.

So what I want to do is to add the same Category assignment box from Events to Events Page screen which looks like this:

And is assigned like this:

register_taxonomy("events-cat", 
                        array("Events Categories"), 
                        array(  "hierarchical" = true, 
                                "label" = "Events Categories", 
                                "singular_label" = "Events Categories", 
                                "rewrite" = true,
                                "query_var" = true
                            ));

register_post_type( 'events-item',
    array( 'labels' = $labels,
         'public' = true,  
         'show_ui' = true,  
         'capability_type' = 'post',  
         'hierarchical' = false,  
         'taxonomies' = array('events-cat'),
         'supports' = array('title', 'editor', 'thumbnail', 'comments', 'custom-fields', 'page-attributes') ) );

In /includes/register.php so I tried to add a new taxonomy registration to POST screen according to documentation I've found:

register_taxonomy("post-events-cat",
    array('post'),
    array(  "hierarchical" = true,
        "label" = "Post Events Categories",
        "singular_label" = "Post Events Categories",
        "rewrite" = true,
        "query_var" = true
));

But well, it didn't work.

So I wonder how I can tweak particular screen in Wordpress? Not even really related to the Theme itself.

Thanks

Topic screen-columns custom-taxonomy plugins Wordpress

Category Web


It sounds like you want register_taxonomy_for_object_type to add the taxonomy to the "Page" post type.

register_taxonomy_for_object_type('events-cat','page');

As noted, I don't know how you expect this to work. You are going to have to alter the page templates.

I would also suggest that you look into the Template Hierarchy, in particular the part about custom taxonomies. It sounds like you may be reinventing Core functionality.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.