• Resolved majidmad

    (@majidmad)


    Hi,

    I’ve read the support and found your solution to filter a table by username. As you suggested I added following code to my function.php:

    add_shortcode( 'table-user-filtered', 'stosun_tablepress_filtered_table' );
    function stosun_tablepress_filtered_table( $atts ) {
      $current_user = wp_get_current_user();
      $atts['filter'] = $current_user->user_login;
      return tablepress_get_table( $atts );
    }

    And it worked However, I need to only shows some specific columns that match with specific words. For instant, I have 5 columns with headers named Column1, column2, Column3, Column4, and Column5.
    I want a logged-in user can see only his row AND the values in column3 and column5.
    I’ve installed Row Filtering extension and I used below showrtcode but it didn’t work.:
    [table-user-filtered id=1 filter="Column3 && Column5" /]

    Would you please let me know how to solve the problem?
    Thanks

    • This topic was modified 6 years, 9 months ago by majidmad.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, I’ll have to disappoint you here. There is no direct possibility for a column filtering (only for row filtering).

    However, you should only need the Shortcode

    [table-user-filtered id=1 hide_columns="all" show_columns="3,5" /]
    

    Regards,
    Tobias

    Thread Starter majidmad

    (@majidmad)

    Thank you for your reply.
    No doubt, your plugin is the best and is much better that premium one out there. Hope you implement filtering by column, too.

    One more question, I’ve added responsive extension and used following code:
    [table-user-filtered id=5 responsive=collapse hide_columns="1"/]

    But, It is not working. it is not responsive at all. Please use following credentials to log in to check:
    http://rafiee.heykado.com/login/
    username: 97120033186077
    password: Newuser369852

    Thank you

    • This reply was modified 6 years, 9 months ago by majidmad.
    • This reply was modified 6 years, 9 months ago by majidmad.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    good to hear that this helped! The problem here is that some of your filtered tables only have one cell (like “Assignments” or “Final Score (After Advantage)”). This means that you can not use the DataTables JS functions with these tables. However, as they are activated a JavaScript error is thrown. This however stops the evaluation of all other JavaScript code on the page, including that of other tables.

    Therefore, you will not be able to use the JS functions on this page, and I recommend to uncheck the “Use DataTables” checkbox for all tables on this page.
    For responsiveness, you can then use the flip or scroll modes only.

    Regards,
    Tobias

    Thread Starter majidmad

    (@majidmad)

    Thanks for your reply. No doubt, TablePress is the best table plugin which never stop a user in a no-way situation. I’ve added row to all tables and it solved the problem.

    As I was reading your page, most extension were developed by you upon users’ request. I hope you develop an extension to be able to filter by columns in near future 🙂

    Best regards,

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the nice feedback and for the suggestion about the Extension! I will add it to my list of ideas and maybe I will develop an Extension in the future 🙂

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Filter by row and column’ is closed to new replies.