BuddyDev

Search

[Resolved] Change my-posts slug in buddyblog

  • Participant
    Level: Initiated
    Posts: 3
    Shayne on #23216

    I want to update my sites permalinks. Currently they are displayed like this.
    https://mysiteurl.com/username/blog/my-posts/blogname/

    How do I change the my-posts slug in the url?

    I’m using the below code for changing the blog slug.
    define( ‘BP_BUDDYBLOG_SLUG’, ‘blog’ );

    is there something similar for the my-posts portion?

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #23219

    HI Shayne,
    Please add this

    
    define('BUDDYBLOG_ARCHIVE_SLUG', 'some-posts');
    
    

    Let me know if that works or not?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Shayne on #23238

    I put that in my bp-custom.php file, it didn’t work.

    Also, I have “Show single posts on user profile” set to true, and also have “add_filter( ‘buddyblog_use_slug_in_permalink’, ‘__return_true’ );” set in my bp-custom.php.

    I’m not sure if that will affect the function or not.

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #23273

    Hi Shayne,
    I have tested it and I can see the issue.

    The ‘BUDDYBLOG_ARCHIVE_SLUG’ constants gets defined very early. It won’t work if you have put it in your bp-custom.php

    I will update to make it work with bp-custom.php in next release. For now, Please put that constant in wp-config.php

    
    define( 'BUDDYBLOG_ARCHIVE_SLUG', 'some-posts' );
    

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Shayne on #23301

    That works! Thanks!

  • Keymaster
    (BuddyDev Team)
    Posts: 24237
    Brajesh Singh on #23313

    You are welcome!

The topic ‘ [Resolved] Change my-posts slug in buddyblog’ is closed to new replies.

This topic is: resolved