• Resolved monjolitop

    (@monjolitop)


    Hi,

    First, thanks for your plugin.

    I tryed to add a new page and i want personnal information on the added page. I strated to learn wordpress few weeks ago and i must miss something but can you help me?

    What i would like to do is, on the member page, add a menu page which contains fields from Buddypress and shortcode for an other plugin.

    Thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Nahid Ferdous Mohit

    (@nfmohit)

    Hi there @monjolitop !
    I hope you are having a great day!

    You should be able to add any shortcodes to a custom menu page added through this plugin. I’ve mentioned the usage steps of the plugin here.

    In short:

    1. Install and activate the plugin
    2. Go to your WordPress Dashboard→BP Custom Menu
    3. Add a new page, enter your content, and publish. It will automatically show up as a menu item in the BuddyPress profile.

    In the menu page contents, you can enter any shortcodes that you’d like to display.

    Hope this helps. Please let me know if you need any further assistance regarding this. Thanks!

    Kind regards,
    Nahid

    Thread Starter monjolitop

    (@monjolitop)

    Hello,

    Thanks for your answer.
    I would like to put a variable in my shortcode.
    For my test :
    1. I modify the budypress.php
    2. Get my user id with $user_id = bp_displayed_user_id();
    3. send my shortcode with my var echo do_shortcode( '[shortcodename param='.$user_id.']' );
    And it works.

    Now, i want to add this php in a file displayed by your plugin.
    Can you tell me how to do this ?

    Thanks,

    Plugin Author Nahid Ferdous Mohit

    (@nfmohit)

    Hi there, @monjolitop !
    I hope you are doing well today!

    Thank you for describing your requirement. Unfortunately, the editor for the profile menu page, like all WordPress post types doesn’t support PHP.

    So, unfortunately, such a shortcode will not work there.

    But as a workaround, you can possibly create a new shortcode as a wrapper of your current shortcode, for example:

    add_shortcode( 'wrappershortcodename', 'wrapper_shortcode_name' );
    function wrapper_shortcode_name() {
        $user_id = bp_displayed_user_id();
        return do_shortcode( '[shortcodename param=' . $user_id . ']' );
    }

    And then, you can try adding the [wrappershortcodename] shortcode in the page editor.

    Hope this helps. Please let me know if this works for you. Thanks!

    Kind regards,
    Nahid

    Thread Starter monjolitop

    (@monjolitop)

    Hello,

    That’s what i did.

    Thanks for your work and your time.

    Best regards,

    Plugin Author Nahid Ferdous Mohit

    (@nfmohit)

    Hi @monjolitop !
    I hope you are doing well today!

    I’m glad to hear that the code worked for you! If this plugin was useful to you, I’d really appreciate if you could share your feedback regarding the plugin in the form of a five-starred review so that it can help other users seeking a similar solution.

    Kind regards,
    Nahid

    Thread Starter monjolitop

    (@monjolitop)

    Plugin Author Nahid Ferdous Mohit

    (@nfmohit)

    Thank you very much for your kind words!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Personnal new page’ is closed to new replies.