Site logo

Archived topic

Problem inserting footer in user profile

5 replies · Started by Hernan on October 26, 2022

Viewing posts 1–6 of 6

In this project I have two footers, one with a more decorative intention and another that I use in pages that contain information or that require widgets in the footer

The issue is that my first footer does not look good in the user profiles (it has a white background with a phrase), here I would like to use my second footer that does not have a white background. I can't get the desired result

The footer that I would like to use does not have a white background, it is this

This is how I have the visual footer configured

And so I have configured the footer without a white background (the one I would like to use in user profiles)

Can you give me a hand? Thanks !

Hi there,

how are the user profile pages created ? Is that via a plugin ?

They are bbpress-buddypress profiles

I think they are related to "author" pages

Hi there,

I checked BuddyPress's conditional tag:https://codex.buddypress.org/developer/template-tag-reference/

And I think the user page is using bp_is_user() tag. Can you try the below filter? Replace the 100with your element ID which you can find in the URL field of the element editor.

add_filter( 'generate_element_display', function( $display, $element_id ) {
    if ( 100 === $element_id && bp_is_user() ) {
        $display = true;
    }
    return $display;
}, 10, 2 );

I apologize for the delay, thank you very much for giving me an option. But finally I have decided to change the order of the footers, the default global footer now does not have white backgrounds so it adapts better to all urls

Perhaps it would be an interesting addition for new versions of GeneratePress to be able to directly choose author pages or user profiles

But for now I'm fine thanks for the support

You are welcome :)

This archived topic is closed to new replies.