Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to restore Xprofile field group


  • Prangesco
    Participant

    @prangesco

    Hi @danbp,

    My question may sound obvious so my apologies in advance if that’s the case.

    The issue: I was trying to hide a specific xprofile field group and used the code you provided here https://buddypress.org/support/topic/conditional-exclusion-of-a-xprofile-fields-group-from-editing/ adding it to bpcustom.php.

    It worked as a charm, and the group is currently visible only to logged-in users (both in profile view and profile edit). However I no longer need the group to be publicly hidden, but removing the function and the respective add_filter from bpcustom.php does not seem to work: the group stays visible to logged-in users only.

    Unfortunately I have no idea about how to address this issue, the best clue I could figure out is I might have to remove the filter registered by your bit of code (and yet that’s but a guess as my php knowledge is pretty amateurish). I would really appreciate if you could help me figuring out what’s happened, considering that my only change to your code was using my own group ID number.

    Thanks in advance for you attention.

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

  • Prangesco
    Participant

    @prangesco

    Sorry for bothering you @danbp,
    I eventually solved this issue by myself and it was much easier than I thought.
    I’m updating this so that you don’t lose time answering and in case it may be useful to somebody else.

    As I guessed, I just needed to pass

    remove_filter( ‘bp_after_has_profile_parse_args’, ‘flegmatiq_profiles’, ‘exclude_groups’ );

    after the functions provided by @danbp in the link I posted above, still in bpcustom.php.
    Apparently it cancelled the filter and fixed the problem.


    danbp
    Moderator

    @danbp

    @prangesco,

    though you found the answer yourself ! […] using my own group ID number.
    If the function is still in your bp-custom with the modified group ID, it continue to be applied to that group despite you changed the fields status. The group ID is still the same.

    But you say you removed the function ? So there is no reason that a group stays under influence of an unexisting function. Do you use a cache plugin ? Clear it or unsure your browser doesn’t store an old cookie. Refresh it (F5) You could also check the existing field settings.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to restore Xprofile field group’ is closed to new replies.
Skip to toolbar