Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change the name of the blogs folder

Viewing 11 replies - 1 through 11 (of 11 total)
  • @johnjamesjacoby

    Keymaster

    I’m not sure if this is the best answer, but because doing this isn’t a super straight-forward task, I just made a new blog called videos, and changed the links in the header.php files to point to it instead of “/blog”.

    @burtadsit

    Participant

    Put this in your bp-custom.php file:

    function blog_to_video($c){

    $c = ‘videos’;

    return $c;

    }

    add_filter(‘bp_blogs_slug’,’blog_to_video’);

    Andy has a filter defined for BP_BLOGS_SLUG.

    @adamwiththehair

    Participant

    Hi Burtadsit

    Thanks for that, but what do I do with it when I make the bp-custom.php and put that code in it? Do I need to do anything else, because it didnt change anything.

    Im not very good with PHP, so sorry about the hassle.

    Thanks

    Adam

    @adamwiththehair

    Participant

    anyone?

    @nicolagreco

    Participant

    create a file like bp-custom.php in wp-content/mu-plugins/

    paste into the things burt has told you, and save it.

    – Nicola

    @adamwiththehair

    Participant

    i done all that, but nothing changed?

    http://beavo.net

    you can see when u click on videos, the top bar shows /blogs. at the moment the menu name has changed. would this effect the stuff in bp-custom.php?

    @burtadsit

    Participant

    Then it’s not executing your bp-custom.php file. You have to have the php script tags ” at the bottom of the file. First and last lines. No blank lines at the top before the first php tag.

    The forums are stripping all lt and gt tags so here goes in phonetic php:

    less-than-symbol question-mark php

    question-mark greater-than-symbol

    @adamwiththehair

    Participant

    Hi sorry, I was on holiday there and only getting back to this.

    I created the PHP file called bp-custom.php and put it in wp-content/mu-plugins/

    I put that code in that file, including the PHP open and close tags, but its still the same!!

    Just to remind anyone reading this from here, all I want to do is change the name of:

    http://www.example.com/blog

    to

    http://www.example.com/videos

    as I am using my blog to show videos only.

    Thanks

    Adam

    @adamwiththehair

    Participant

    Been having a look at it, could it be something to do with the code I was given?

    function blog_to_video($c){

    $c = ‘videos’;

    return $c;

    }

    add_filter(‘bp_blogs_slug’,’blog_to_video’);

    Thats the code I got from here, but should it not be:

    function blog_to_video($c){

    $c = ‘videos’;

    return $c;

    }

    add_filter(‘HOME_BLOG_SLUG’,’blog_to_video’);

    @adamwiththehair

    Participant

    FIXED! I think…

    I went into bp-core.php

    Line 70: define( ‘HOME_BLOG_SLUG’, apply_filters( ‘bp_home_blog_slug’, blog’ ) );

    Changed it to:

    Line 70: define( ‘HOME_BLOG_SLUG’, apply_filters( ‘bp_home_blog_slug’, ‘videos’ ) );

    Works!!!!

    @djpaul

    Keymaster

    *sigh*

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Change the name of the blogs folder’ is closed to new replies.
Skip to toolbar