Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi Golok,

    Are you referring to the slug in the URL? (https://www.example.com/announcements/example)

    Or do you mean the menu item name?

    Evan

    Thread Starter Golok

    (@golok)

    Hi Evan,

    Sorry for my late reply and thanks for your answer.

    I’m referring to the slug in the URL. I wish to use the plugin for an historical timeline, and as such would prefer to have something like ‘www.mysite.com/events/’.

    Cheers,

    Hello. I’ve got the same question. Would like to customize the slug as well. thanks.

    Plugin Author Evan Herman

    (@eherman24)

    Hi Golok and ForaJosh,

    Since the inception of this plugin we’ve included a filter to allow you to alter the slugs of the announcements. You can set them to be whatever you like, for example /events/.

    Feel free to copy the following snippet and paste it at the bottom of your theme (or child themes) functions.php file:

    // alter '/announcement/' to be '/event/'
    function timeline_express_change_announcement_slug( $slug ) {
        $slug = 'event';
        return $slug;
    }
    add_filter('timeline-express-slug', 'timeline_express_change_announcement_slug' );

    Once you add that, you’ll want to save the functions.php.

    Once saved, you’ll want to refresh your permalinks. This is an important step, and if left undone you’ll encounter 404 errors when you try and access the single announcement template.

    From within the administrative dashboard head into the permalinks page, ‘ Settings > Permalinks’ and simply click ‘Save’. Once completed, head back into any of your announcements to see if things updated properly.

    Thanks!
    Evan

    Plugin Author Evan Herman

    (@eherman24)

    Closing this issue out due to inactivity.

    Thanks,
    Evan

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing "announcement" directory name?’ is closed to new replies.