Custom Post Type Archive Title Lowercase

Is there any reason that my custom post type archive title is all lower-case even though 'name' is defined as sentence-case?

Here is the post type function I'm using:

function resources_post_type() {
$labels = array(
    'name'               = _x( 'Resources, Help  Support', 'post type general name' ),
    'singular_name'      = _x( 'Resource', 'post type singular name' ),
    'add_new'            = _x( 'Add New', 'resources' ),
    'add_new_item'       = __( 'Add New Resource' ),
    'edit_item'          = __( 'Edit Resource' ),
    'new_item'           = __( 'New Resource' ),
    'all_items'          = __( 'All Resources' ),
    'view_item'          = __( 'View Resource' ),
    'search_items'       = __( 'Search Resources' ),
    'not_found'          = __( 'No resources found' ),
    'not_found_in_trash' = __( 'No resources found in the Trash' ), 
    'parent_item_colon'  = '',
    'menu_name'          = 'Resources'
);
$args = array(
    'labels'        = $labels,
    'description'   = 'Holds our resources and resource specific data',
    'public' = true,
    'show_ui' = true,
    'show_in_menu' = true,
    'query_var' = true,
    'menu_position' = 5,
    'has_archive'   = true,
    'rewrite' = array( 'slug' = 'resources' ),
    'supports' = array(
        'title',
        'editor',
        'author',
        'thumbnail',
        'excerpt'
    )
);
register_post_type( 'resources', $args );   
add_action('admin_init', 'flush_rewrite_rules');

} add_action( 'init', 'resources_post_type', 0 );

I'm using Thesis 2.0

Topic custom-post-type-archives theme-thesis custom-post-types Wordpress

Category Web


This is the best way to accomplish this without having to make functions for each type. You just pass the title to the function and you can easily manipulate with the ucfirst() function. Just stick this in custom.php

add_filter('thesis_archive_title', 'captialize_archive_title');
function captialize_archive_title($title) {
    return ucfirst($title);
}

It's not the perfect solution, but it will do considering the amount I've spent on it so far. I couldn't find the offending code, but I believe that this is something to do with the Thesis Core.

So instead, I wrote a filter to change the copy based on the post type:

function resource_archive_title() {
if (is_post_type_archive('resources')) { ?>
<h1>Resources, Help & Support</h1>
<?php }
}

add_filter('thesis_archive_title', 'resource_archive_title');

I'll just add a few elseif statements for other post types.

About

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