Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
3  
You are going to need to post some code. This is way too vague. –  Jake Feb 22 '13 at 2:40
1  
Check for your CSS: text-transform:lowercase; In Chrome press F12. In Firefox, use Firebug. –  Tran Cuong Feb 22 '13 at 3:19
    
Sorry @Jake, I've updated my question. –  Nathan Monk Feb 22 '13 at 9:38
    
@trancuong That was my initial thought too but it's definitely not that. –  Nathan Monk Feb 22 '13 at 9:39
    
In the template file, is it possible that anything is forcing lowercase in the PHP? Like "strtolower"? –  Jake Feb 23 '13 at 15:21

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.