Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19872
    jk
    Participant

    Hallo,

    I want to rename the breadcrumb Events into Happening.
    Is it possible and how can I achieve it?

    Any advice would be appreciated.

    Kind regards,
    John K.

    #20016
    Bartosz
    Keymaster

    The name Events comes from the event post type label.

    In order to change it in breadcrumbs navigation you can just change the post type labels.

    Here are the examples of how this can be done in different contexts (menu, labels, messages) https://gist.github.com/markoheijnen/2399864

    #20213
    jk
    Participant

    I tried the following in events-maker.php. It results in a fatal error:

    add_action( ‘init’, array( &$this,

    ‘change_post_object_label’ ), 0 );
    }
    function change_post_object_label() {
    global $wp_post_types;
    $labels = &$wp_post_types[‘post’]->labels;
    $labels->name = ‘Happenings’;
    $labels->singular_name = ‘Happening’;
    $labels->add_new = ‘Add new’;
    $labels->add_new_item = ‘Add Happening article’;
    $labels->edit_item = ‘Edit Happening’;
    $labels->new_item = ‘Happening’;
    $labels->view_item = ‘View happening’;
    $labels->search_items = ‘Search happening’;
    $labels->not_found = ‘No happening found’;
    $labels->not_found_in_trash = ‘No happenings found in the trash’;
    $labels->all_items = ‘All happenings’;
    $labels->menu_name = ‘Happenings’;
    $labels->name_admin_bar = ‘Happenings’;
    }

    #20214
    Bartosz
    Keymaster

    You don’t do that in the plugin – just do that in your current theme.
    A simple example: https://stackoverflow.com/questions/12949722/change-label-posts-to-articles-in-wordpress

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.