• Resolved MG7282

    (@mgrinshpun)


    I followed the instructions here adding the following code:

    add_filter( ‘wpuf_account_sections’, ‘wpuf_my_page’ );

    function wpuf_my_page( $sections ) {
    $sections = array_merge( $sections, array( array( ‘slug’ => ‘dashboard’, ‘label’ => ‘My Listings’ ) ) );

    return $sections;
    }

    add_action( ‘wpuf_account_content_my-page’, ‘wpuf_my_page_section’, 10, 2 );

    function wpuf_my_page_section( $sections, $current_section ) {
    wpuf_load_template(
    “dashboard/account-listings.php”,
    array( ‘sections’ => $sections, ‘current_section’ => $current_section )
    );
    }

    I created the template file. The new tab is there but nothing happens when it’s clicked.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @mgrinshpun,

    Extremely sorry for the late reply.

    Can you please check if you have the account.php file available in the dashboard directory as you added within your custom code.

    Thank you!

    mikelaguiriano

    (@mikelaguiriano)

    Hi
    I have the same problem

    Parse error: syntax error, unexpected ”, ‘wpuf_my_page” (T_CONSTANT_ENCAPSED_STRING), expecting ‘,’ or ‘)’ in C:\wamp64\www\parkingonline\wp-content\themes\generatepress\functions.php on line 383

    add_filter( ‘wpuf_account_sections’, ‘wpuf_my_page’ );
    function wpuf_my_page( $sections ) {
    $sections = array_merge( $sections, array( array( ‘slug’ => ‘dashboard’, ‘label’ => ‘My Page’ ) ) );

    return $sections;
    }

    add_action( ‘wpuf_account_content_reservas’, ‘wpuf_my_page_section’, 10, 2 );

    function wpuf_my_page_section( $sections, $current_section ) {
    wpuf_load_template(
    ““dashboard/reservas.php”,
    array( ‘sections’ => $sections, ‘current_section’ => $current_section )
    );
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding Custom Tab to Account Page’ is closed to new replies.