• Resolved CB

    (@cbrandt)


    Hi guys,

    I’ve just noticed that Learnpress has changed all of my website permalinks to a version without the trailing slash.

    So a URL that ended like:

    example.com/some-course/some-lesson/

    became

    example.com/some-course/some-lesson

    Using the WP Rollback plugin, I identified the issue as having started with version 4.1.6.3. The problem probably went unnoticed for a long time because WordPress automatically redirects requests that match the path but miss the ending slash.

    Last week I changed some settings in my website and noticed the redirects, which I’m trying to avoid. for speed, SEO and Google indexing reasons.

    Is there a fix available? Anything I can change in the functions.php of my child theme to revert this while you guys (hopefully) find a way to revert this mis-behavior?

    Many thanks,

    CB

    • This topic was modified 2 years, 1 month ago by CB.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ThimPress

    (@thimpress)

    Hi cbrandt,
    You can add the custom code below to the file functions.php

    add_filter('learn-press/course/item-link', function($item_link){
       return trailingslashit($item_link);
    });

    Thanks.

    Thread Starter CB

    (@cbrandt)

    Thank you. The snipped worked as provided.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘All pages had trailing slash removed since version 4.1.6.3’ is closed to new replies.