• Resolved musoaga

    (@musoaga)


    Hey, nice plugin.

    Is it possible to use your shortcode in any PHP File to display messages? If not, is it possible to set a custom URL for “Better Messages Location” instead of select a site from dropdown.

    I would like to display the messages on a specific page, which is not listed in the wordpress sites in dashboard.

    To be more specific: I want to show the messages in a custom woocommerce endpoint.

    Thanks

    • This topic was modified 3 years, 10 months ago by musoaga.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wordplus

    (@wordplus)

    /**
     * Replacing plugin URL
     */
    add_filter('bp_better_messages_page', 'overwrite_bp_better_messages_location', 10, 2 );
    function overwrite_bp_better_messages_location( $url, $user_id ) {
        return bp_core_get_user_domain( $user_id ) . 'settings/messages/';
    }
    
    /**
    * Displaying messages in custom place
    */
    echo BP_Better_Messages()->functions->get_page();
    • This reply was modified 3 years, 10 months ago by wordplus.
    Thread Starter musoaga

    (@musoaga)

    Thanks for quick support!

    echo BP_Better_Messages()->functions->get_page(); worked for me

    • This reply was modified 3 years, 10 months ago by musoaga.
    Plugin Author wordplus

    (@wordplus)

    dont forget to use filter also, so notifications will point users to the right place.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcode in PHP and Custom Location’ is closed to new replies.