Archived topic
Missing title on custom taxonomy archive
1 reply · Started by Marvin on June 17, 2021
Hello,
I have a Custom Post Type for manufacturers and a Custom Taxonomy called manufacturers_categories to categorize these manufacturers:
/* register Custom Taxonomy */
function registerManufacturersTaxonomy() {
$labels = array(
'name' => 'Kategorien',
'singular_name' => 'Kategorie',
'search_items' => 'Kategorien durchsuchen',
'all_items' => 'Alle Kategorien',
'edit_item' => 'Kategorie ändern',
'update_item' => 'Kategorie aktualisieren',
'add_new_item' => 'Kategorie hinzufügen',
'new_item_name' => 'Neue Kategorie',
'menu_name' => 'Kategorien',
);
$args = array(
'hierarchical'=> false,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'show_in_rest' => true,
'query_var' => true,
'rewrite' => array('slug' => 'hersteller-kategorie'),
);
register_taxonomy('manufacturers_categories', array('manufacturers'), $args);
unset($args);
unset($labels);
}
add_action('init', 'registerManufacturersTaxonomy', 0);
The template file for the Custom Taxonomy is named taxonomy-manufacturers_categories.php and already working. The title of the Custom Taxonomy category is correctly included in the <title>-tag in <head>, but not shown on my page header element (Block - Page Hero). The dynamic text type for the title is empty. What am I doing wrong?
I'm also looking for a solution to show the description of the Custom Taxonomy in the header element via dynamic text. Is this possible?
Thank you very much, I love your Generatepress-Theme and GenerateBlocks-Plugin!
Kind regards
Marvin
Hi there,
I’m also looking for a solution to show the description of the Custom Taxonomy in the header element via dynamic text. Is this possible?
You can do it by shortcode. See my php snippet here:
https://generatepress.com/forums/topic/add-dynamic-content-in-multiple-pages/#post-1822351
Or Perhaps I'm understanding this incorrectly, Let us know if this is actually what you're aiming for.