• Resolved callmejud

    (@callmejud)


    Hello,

    I’d like to know if it’s possible to change the /campaigns/ slug, since the website it’s in another language.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Bisset

    (@dimensionmedia)

    @callmejud thanks for reaching out – good question!

    Yes, you can change the /campaigns/ slug using the charitable_campaign_post_type filter. Drop this into a snippet plugin (like WPCode) or your theme’s functions.php:

    add_filter( ‘charitable_campaign_post_type’, function( $args ) {
    $args[‘rewrite’][‘slug’] = ‘campanyes’; // your translated slug
    return $args;
    } );

    After saving, go to Settings -> Permalinks and click Save Changes to flush the rewrite rules… otherwise your campaign URLs will 404.

    A couple of quick notes:

    • Keep the slug lowercase and URL-safe (no spaces or accented characters).
    • If your site is already live, set up redirects from the old /campaigns/… URLs to the new ones so you don’t lose links.

    Hope that helps! Let me know if you have any questions.

    Thread Starter callmejud

    (@callmejud)

    Hello David,

    Thanks a lot for your quick reply 🙂

    I added the code with CodeSnippets and it works perfectly!

    Have a nice day

    Plugin Author David Bisset

    (@dimensionmedia)

    @callmejud Awesome! Glad we could help. Reach out if you need assistance again. Have a good one! 👍🏻

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.