• Resolved jonomteam

    (@jonomteam)


    How to set up please explain me
    I have search some user has add this where???

    if ( ! is_admin() ) {
      add_shortcode( 'table-user-filtered', 'tablepress_filtered_table' );
      function tablepress_filtered_table( $atts ) {
        if ( ! is_user_logged_in() ) {
          return 'Your Message Here';
        }
        $current_user = wp_get_current_user();
        $userid = $current_user->ID;
        $atts['filter'] = $userid;
        $atts['filter_full_cell_match'] = true;
        $atts['cache_table_output'] = false;
        return tablepress_get_table( $atts ) ;
      }
    }
    

    Please help me step by step

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    What exactly are you trying to do? Normally, you’ll just need the TablePress Extension from https://tablepress.org/extensions/row-filter/ and can then add this extra code into your theme’s “functions.php” file.
    There should also be more instructions on the page where you found this code.

    Regards,
    Tobias

    Thread Starter jonomteam

    (@jonomteam)

    I want import/add daily manually created XLSX files that contains different user id’s with different information’s and filter table by currenty logged user id’s to show customers only their own information.
    Is it any way to do that

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for the clarification! Then, the code and approach that you have found should indeed be worth a try! I suggest that you try following the mentioned instructions to add this to your site.

    Regards,
    Tobias

    Thread Starter jonomteam

    (@jonomteam)

    Hey @tobiasbg Thank You
    But code doesn’t work, I want to setup only login user can see their data not others how to do that all .
    Please explain me properly.
    @tobiasbg Sir

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    did you install and activate the TablePress Row Filter Extension as mentioned above? Is that working when manually adding a filter term?
    Where exactly did you then add the extra PHP code?
    Did you then use the modified Shortcode

    [table-user-filtered id=123 /]
    

    ?

    Regards,
    Tobias

    Thread Starter jonomteam

    (@jonomteam)

    Yes It’s working
    Thank You
    @tobiasbg

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I want to set only user can their row not other’ is closed to new replies.