Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • @adamwiththehair

    Participant

    sorry, i hate bumping, i know, but i rly need an answer to this!!

    @adamwiththehair

    Participant

    sounds like what I am looking for! would you mind going through how you did it?

    @adamwiththehair

    Participant

    I have this:

    <?php

    function oci_restrict_access(){
    global $bp, $bp_unfiltered_uri;

    if (!is_user_logged_in() &amp;&amp;
    (MEMBERS_SLUG == $bp_unfiltered_uri[0]
    || BP_GROUPS_SLUG == $bp->current_component
    || 'ask/' == $bp->current_component
    ))
    {

    bp_core_redirect( $bp->root_domain );
    }
    }
    add_action( 'wp', 'oci_restrict_access', 3 );

    ?>

    But it still goes to the ASK page.

    Am I doing something wrong?

    @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!!!!

    @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

    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

    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?

    @adamwiththehair

    Participant

    anyone?

    @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?

Viewing 10 replies - 1 through 10 (of 10 total)
Skip to toolbar