Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • xiot
    Participant

    @xiot

    @hnla

    Hi Hugo, thanks for the advice!

    I tested it out, but still no luck with that. I contacted the Theme creator of the template i’m using, but when i change the post title to not act as a link. The Buddypress Profile Title is still a Link.

    It doesn’t act 100% like a common post title. Within the title it is a normal link. So it catches the CSS for a link, while a normal Post title uses its own styles.

    I checked my code when whatching the site and it shows me the divs it it creating.

    <div id="page-0" class="post-0 bp_members type-bp_members status-publish hentry">
    				
    				<h2 class="page-title"><a href="http://mysite.com/member/admin/">Admin</a></h2>
    

    and so on.

    I can’t find out what I have to change that it’s not a a link anymore.

    Any advice?

    Thanks so far, i really appreciate your help Hugo.


    xiot
    Participant

    @xiot

    @hnla

    Hi Hugo, thanks for your reply!

    Yes i am using a custom template. It’s called Themezee Synergie.

    I found out that this it is using the same CSS as a post/page title. Unfortunately i cannot find out where to edit what is written in the title. Never done that before. I guess I won’t be able to completely unlink it, but maybe change the destination of the link, that it doesn’t lead to profile directly rather to the edit part of the profile.

    Maybe you have an idea how to achieve that. Just tell me wether you need more informations.


    xiot
    Participant

    @xiot

    Can anyone maybe link or recommend a person i can contact directly? It seems that this is a harder question than I thought. I really need help with this issue.

    Thanks and greeting, Lars


    xiot
    Participant

    @xiot

    @bphelp

    🙂 yeah sorry, I’ll keep that in mind. I will be more specific next time so the helping hands can actually help 😉

    Thanks bphelp 🙂


    xiot
    Participant

    @xiot

    I still can’t find the right file.. any ideas? Thanks in advance


    xiot
    Participant

    @xiot

    I am still searching for a solution, but i cant find the correct file!

    Can anybody help? I know that i just need to delete a href around a certain function. But no luck with finding it! 🙁


    xiot
    Participant

    @xiot

    @bphelp

    Yeah sorry, I thought it would be clear because i referred to a certain code. The whole block I wrote above the quote you posted was about the code I also posted.

    Sooo.. let’s just handle it as a communication problem! Then again, thanks for the idea and the help and sorry that I wasn’t specific enough. I am not a native of the english language.

    Regards, Lars


    xiot
    Participant

    @xiot

    @bphelp

    This looks nice but wasn’t what I was looking for since I have a frontpage already and don’t want to change it!
    But the link within the code was pretty helpfull! I couldn’t find out where to find the bp-custom.php. Now I know that it has to be created 😀 Thanks anyway!

    And also thanks to @struth !
    Cause of you i found out how to switch the result of is_user_logged_in() . It’s a simple “!” that needs to be in front of the function!

    But I still can’t imagine why the snippet was named to direct visitors to the registration page! It doesn’t do that.

    Now the code is modded and it DOES redirect not logged in users to the registration page!

    Feel free to use it 🙂

     function redirect2profile(){
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    	if($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){ 
    		global $current_user;
    		wp_redirect( get_bloginfo('url') . '/member/'. $current_user->user_login . '/profile/'); 
    		exit();
    	} else {
    		if ($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php') && !is_user_logged_in()) {
    		wp_redirect( get_bloginfo('url') . '/register/'); 
    		exit();
    		}}
    			
     }
    add_action('init', 'redirect2profile');
    

    Cheers, Lars


    xiot
    Participant

    @xiot

    Hi there!

    This worked quite fine for me, but i have the problem that this code doesnt bring me to a signup page when you aren’t logged in.

    I tried to add the redirect with “else” but it didn’t work for me either.
    The code has now changed, since I tried to figure out why it doesn’t redirect me to my register page.

    I’m not very skilled with PHP so maybe someone can help me out.
    I want the code to redirect the not logged in user to a register page

      function redirect2profile(){
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    		if ( is_user_logged_in()){
    		if ($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php')) {
    			global $current_user;
    			wp_redirect( get_bloginfo('url') . '/member/'. $current_user->user_login . '/profile/'); 
    			exit();
    			}
    	} else {
    		if ($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php')) {
    		wp_redirect( get_bloginfo('url') . '/register/');
    		exit();
    		}
    		}
    		 }
    add_action('init', 'redirect2profile');
    
Viewing 9 replies - 1 through 9 (of 9 total)
Skip to toolbar