• Resolved aaylasecura

    (@aaylasecura)


    Hi there, thank you for the great plugin. I’d like to request a shortcode (and optionally block) for displaying the account sidebar as a simple list of links that can be inserted in a menu for example. Apologies if there’s already one like that but I couldn’t find it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support alexrollin

    (@alexrollin)

    Hello!

    Usually we see people just link to /account/ as the URL and then people can click into the one they want.

    I think you should be able to add any of them you want – just click on them, and copy it from the browser address bar.

    Create a new menu ‘custom link’ and paste in the URL you copied.

    Does that work for you?

    Thread Starter aaylasecura

    (@aaylasecura)

    Hi there, thank you for replying. I had thought about doing this, but I wanted it to be “dynamic” in the sense that if you add or remove or change any of the sidebar items, I wouldn’t have to change the menu I’ve manually created. Hence I wanted a shortcode/block that does the same as the full account page except it only shows the sidebar links (and ideally a login link if the user is not logged in). If you think that’s not too difficult, I’d love for this feature to be implemented ??

    Plugin Support alexrollin

    (@alexrollin)

    Hello,

    This is a customization you can undertake if you have some developer skills.

    You can create your own shortcode, uing <?php do_action( ‘uwp_account_menu_display’ ); ?> action in your shortcode. Output that to display all the account menu items. Let us know if it helps or not.

    Thread Starter aaylasecura

    (@aaylasecura)

    Thank you, using that action indeed solves my problem ??

    Thread Starter aaylasecura

    (@aaylasecura)

    Oh, for the record, for anyone wanting to implement this, define a custom shortcode like this (name it whatever you want obviously):

    add_shortcode('_uwp_account_tabs', function () {
    ob_start();
    do_action('uwp_account_menu_display');
    return ob_get_clean();
    });

    And then you need some CSS overriding to make “Edit account” clickable again and to always show it as column. For example add class “profile-menu” to the parent element containing the shortcode and define:

    .profile-menu .nav-link.active:not([data-bs-toggle='dropdown']) {
    cursor: pointer;
    pointer-events: auto;
    }

    .profile-menu ul {
    flex-direction: column !important;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.