Home Forums Plugin Support WP User Frontend Pro Dashboard columns

This topic is: resolved

Tagged: 

This topic contains 5 replies, has 3 voices, and was last updated by  Sk 4 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22594

    bigtom
    Member
    Post count: 74

    I have added one extra column in the dashboard, but I need to add a few more and hopefully control the order of the columns. Not sure how to do this.

    Sent the same question to Premium Support a few weeks ago and still no answer. Could use the help.

    Thanks.

    #22648

    Sekander Badsha
    Member
    Post count: 2067

    Hello Bigtom,
    It would be better for us to understand if you can provide a screenshot.

    #23103

    bigtom
    Member
    Post count: 74

    Not sure how to add a screen shot here.

    The first problem is adding more than one column to the dashboard. If we can start with that it would be a great help.

    Thanks.

    #23129

    Sekander Badsha
    Member
    Post count: 2067

    You can upload the screenshot anywhere and post the link here. With out seeing what you're really trying to do, I'm unable to understand what is the issue. Hope you understand and thanks for having patience. 🙂

    #23154

    bigtom
    Member
    Post count: 74

    I want to do this for more than one column.

    http://docs.wedevs.com/adding-columns-to-dashboard-table/

    As your example shows a screen shot this should help you. I have added one column just fine per the documentation, but what if I need to add “Sub Title 2” as well?

    Your example shows Sub Title between Status and Options, but how can I set it between Featured Image and Title?

    #23190

    Sk
    Moderator
    Post count: 371

    Hello bigtom,

    Here is your answer.

    As your example shows a screen shot this should help you. I have added one column just fine per the documentation, but what if I need to add “Sub Title 2″ as well?

    You have used this code

    
    /**
     * Add a new column header in dashboard table
     *
     * @param array $args dashboard query arguments
     * @return void
     */
    function wpufe_dashboard_change_head( $args ) {
        printf( '<th>%s</th>', __( 'Sub Title', 'wpuf' ) );
    }
     
    add_action( 'wpuf_dashboard_head_col', 'wpufe_dashboard_change_head' );

    to add one column title.

    now write one more line in the function to add one more column like the following

    
    /**
     * Add a new column header in dashboard table
     *
     * @param array $args dashboard query arguments
     * @return void
     */
    function wpufe_dashboard_change_head( $args ) {
        printf( '<th>%s</th>', __( 'Sub Title', 'wpuf' ) );
        printf( '<th>%s</th>', __( 'Sub Title2', 'wpuf' ) );
    }
     
    add_action( 'wpuf_dashboard_head_col', 'wpufe_dashboard_change_head' );

    Your example shows Sub Title between Status and Options, but how can I set it between Featured Image and Title?

    please navigate to wp-user-frontend/templates/dashboard.php and cut line 29 which is

    <?php do_action( 'wpuf_dashboard_head_col', $args ) ?>

    then pest it after line 25 on the same page. which is

    <?php
     if ( 'on' == $featured_img ) {
         echo '<th>' . __( 'Featured Image', 'wpuf' ) . '</th>';
     }
    ?>

    That's all you have to do.

    Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Dashboard columns’ is closed to new replies.