Skip to content

Instantly share code, notes, and snippets.

@amdrew
Last active December 21, 2015 03:59
Show Gist options
  • Save amdrew/6246027 to your computer and use it in GitHub Desktop.
Save amdrew/6246027 to your computer and use it in GitHub Desktop.
Change the post type labels in Easy Digital Downloads
<?php
function my_child_theme_set_download_labels( $labels ) {
$labels = array(
'name' => _x( 'Products', 'post type general name', 'your-theme-name' ), // this is the one that is "downloads" by default, change this to Templates
'singular_name' => _x( 'Product', 'post type singular name', 'your-theme-name' ),
'add_new' => __( 'Add New', 'your-theme-name' ),
'add_new_item' => __( 'Add New Product', 'your-theme-name' ),
'edit_item' => __( 'Edit Product', 'your-theme-name' ),
'new_item' => __( 'New Product', 'your-theme-name' ),
'all_items' => __( 'All Products', 'your-theme-name' ),
'view_item' => __( 'View Product', 'your-theme-name' ),
'search_items' => __( 'Search Products', 'your-theme-name' ),
'not_found' => __( 'No Products found', 'your-theme-name' ),
'not_found_in_trash' => __( 'No Products found in Trash', 'your-theme-name' ),
'parent_item_colon' => '',
'menu_name' => __( 'Products', 'your-theme-name' )
);
return $labels;
}
add_filter( 'edd_download_labels', 'my_child_theme_set_download_labels' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment