• Resolved Vox

    (@voxclamantis)


    I renamed the category base to “language” and this renaming is accurately reflected in the link taxonomy. However, the renaming is not reflected in the page title (h1 class=”page-title”). This is to say, when viewing by category, a given URL of
    https://www.voxclamantisindeserto.us/language/en utilizes the renamed category base, but the page title (h1 class=”page-title”) still reads “CATEGORY: ENGLISH” rather than “LANGUAGE: ENGLISH” as would be consistent with the renaming of the category base.

    I do realize that the renaming of category base appears under the permalink customization options, but given that my menu and widget structure are also changed (independently, albeit) also use “language” rather than “category,” my concern with the theme’s failure to change “category” site-wide could lead to confusion for a site visitor. In this line, I also wonder if the “div.taxonomy-description” subheading isn’t redundant. It does not exist for format and tag views and it seems out of place in the category view.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • as your theme uses the_archive_title() in the category archive, you can use the corresponding filter;
    here is some possible example code for functions.php of your (child) theme:

    add_filter( 'get_the_archive_title', 'use_category_base_in_archive_title' );
     
    function use_category_base_in_archive_title( $title ) {
        if ( is_category() && get_option('category_base') ) $title = str_replace( 'Category:', ucfirst( get_option('category_base') ) . ':', $title );
        return $title;
    }
    

    I popsted about that 3 years ago in my site

    Thread Starter Vox

    (@voxclamantis)

    Thank you. I can’t believe this has been an issue for so long.

    Thread Starter Vox

    (@voxclamantis)

    I just inserted your code and it worked like a charm! Very cool, bro. Thank you.

    • This reply was modified 6 years, 7 months ago by Vox.
    Thread Starter Vox

    (@voxclamantis)

    You know, one thing that really annoys me is inconsistency! Now that I have category_base resolved, I have noticed that the theme has another issue in the “h1 page-title” in that “category” and “tag” views have a colon delimiter but “type” (sometimes “format”) does not. Is there any way to make it display the page title as “type: xyz” ?

    • This reply was modified 6 years, 7 months ago by Vox. Reason: correct terminology
    • This reply was modified 6 years, 7 months ago by Vox.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Category Base Rename Is Inconsistent’ is closed to new replies.