Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Groups, Member, Forum links redirect to homepage – using Child theme


  • Faramarz
    Participant

    @faramarz

    This is strange and I don’t think it’s the same old redirect to home page issue. For my case it only happens when I activate my child theme. Everything works fine with “Twenty Twelve” theme, but when I activate my child theme, all links redirect to home page.

    My child theme is based on bp-default theme and it’s located in my root wp-content/themes/child-theme-name and these are the only files I have inside my child theme:

    • functions.php
    • style.css
    • header.php

    Is it okay to start with these files or should I copy/paste more files/folders such as activity, blogs, forums, groups, etc from my bp-default theme?

    By the way, this is the code I am using in my functions.php so bp doesn’t queue up the default stylesheet:`<?php
    if ( !function_exists( ‘bp_dtheme_enqueue_styles’ ) ) :
    function bp_dtheme_enqueue_styles() {}
    endif;
    ?>`

    and I modified my header.php and added a line to link my new css file.

    Any help for resolving this is appreciated.

    Thanks

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

  • @mercime
    Participant

    @mercime

    Is it okay to start with these files


    @faramarz
    Yes. You only need to copy over the template files from BP default theme if you want to make modifications.

    Everything works fine with “Twenty Twelve” theme, but when I activate my child theme, all links redirect to home page.

    … which shouldn’t be the case at all.
    – What plugins do you have installed?
    – What modification/s have you made to your header.php, what did you add?
    – What other code do you have in your functions.php file?


    Faramarz
    Participant

    @faramarz

    @mercime the only plugin I am using is bbPress and the only modification I made to header.php is adding this:

    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

    and my functions.php only has this code:

    <?php
    if ( !function_exists( 'bp_dtheme_enqueue_styles' ) ) :
        function bp_dtheme_enqueue_styles() {}
    endif;
    ?>

    Faramarz
    Participant

    @faramarz

    okay, I just removed the line I added to my header.php in my child theme, now the CSS of the website is broken BUT the redirection is not happening and the links are working. This is strange.


    Faramarz
    Participant

    @faramarz

    @mercime .. I found the problem. It was my CSS file. I added something in my style.css to remove the site name and use an image logo instead, so I used this for my logo link:

    h1#logo a {
    	display: block;
    	width: inherit;
    	height: inherit;
    	padding-top: 9999px;
    	overflow: hidden;
    }

    the padding-top was hovering over all Groups, Members and Profile links and of course it was taking you to home page because I was actually clicking on logo URL. duh!!!

    Sorry for this confusion and thanks.


    @mercime
    Participant

    @mercime

    @faramarz No problem. Glad you found the cause and thanks for posting it here.
    Cheers.


    philmay
    Participant

    @philmay

    so how did you fix this?


    @mercime
    Participant

    @mercime

    @philmay he fixed it by repositioning the site header link to above the navigation bar instead of being right on top of it in his theme’s stylesheet.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Groups, Member, Forum links redirect to homepage – using Child theme’ is closed to new replies.
Skip to toolbar