BuddyDev

Search

[Resolved] BuddyPress User Contact Form, replace content on page.

  • Participant
    Level: Enlightened
    Posts: 73
    Gregg Housh on #26150

    Hi again!

    I love this plugin, but I need to do something a bit different. I want to restrict users, but instead of hiding the tab and the form, I want to replace the form with a prompt to upgrade.

    So what I think I need is to set it to allow anyone to use or comment, so it puts the tab in, but then use a filter on the actual drawing of the content. So I can decide if it actually draws the form, or my own code.

    I use Memberpress and it has 4 levels, 3 of them can have a user contact form, the free level can’t. I don’t expect you to integrate with a membership plugin, but if there is a way for me to filter the content in functions.php then I can do it myself.

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #26154

    Hi Gregg,
    Thank you for the question.

    I am not familiar with memberpress.
    If you know how to hide based on the membership, there there is an easy solution.

    You can copy buddypress-user-contact-form/templates/buddypress/members/single/bpucf-form.php to yourtheme/buddypress/members/single/bpucf-form.php

    Then, You can modify it as you please.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 73
    Gregg Housh on #26155

    Thank you Brajesh!

    I am always scared to move too many files into my child theme, for fear that I will not remember to merge changes on plugin updates.

    For Memberpress I know how to check what membership they and if/else through them to change content.

    If there isn’t a filter, I can do the child theme file copy. Thanks again, your support is always quick and awesome.

  • Keymaster
    (BuddyDev Team)
    Posts: 21801
    Brajesh Singh on #26156

    Hi Gregg,
    The purpose of template override is to avoid worrying about the plugin update.

    In my opinion, This is the right way to go ahead by overriding the template.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 73
    Gregg Housh on #26157

    I’ll do it now, thank you 🙂

You must be logged in to reply to this topic.

This topic is: resolved