How to remove “Category:” title prefix in Twenty Sixteen theme?

That title is coming from archive.php file of TwentySixteen theme. You can find a <header> code section in that file. What you can do, simply copy the archive.php file as category.php and then remove the following code section from category.php file: <header class=”page-header”> <?php the_archive_title( ‘<h1 class=”page-title”>’, ‘</h1>’ ); the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ ); ?> … Read more

Using same term for slug and category

OK, found it. it is possible to have the same slug for a page and a category name. The problem was that someone installed a “redirection” plugin that caused the problems. Lesson learned is to restrict the capabilities of people working on the website, so that they cannot install plugins..

Exclude category when displaying all categories assigned to a post

get_the_category() has a filter, get_the_categories, that will filter the categories. You can do something like this: add_filter( ‘get_the_categories’, ‘wpse426499_filter_categories’ ); /** * Filters the categories. * * @param WP_Term[] $categories An array of WP_Term (ie, category) objects. * @return WP_Term[] The filtered array of WP_Term objects. */ function wpse426499_filter_categories( $categories ) { $undesired_id = 2; … Read more

WordPress add menu items display slug too

To directly answer your question, you can use the wp_setup_nav_menu_item filter to change properties of the nav menu item: add_filter( ‘wp_setup_nav_menu_item’, static function ( $menu_item ) { if ( ! is_admin() || empty( $menu_item->taxonomy ) || ‘category’ !== $menu_item->taxonomy ) { return $menu_item; } $menu_item->title .= sprintf( ‘ (%s)’, $menu_item->slug ); return $menu_item; } ); … Read more

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş