WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
use one table but hide different rows when displaying on post/page (2 posts)

  1. q5sys
    Member
    Posted 1 year ago #

    use one table but hide rows

    I dont know if this is possible or not, hence me asking.
    I'll use 2 pages on my site as an example.
    First: http://mowersport.com/?page_id=971

    In that page I am using a single table with race results for a bunch of different classes (AP, BP, CP, etc)
    Its one big table with everything in it.

    However I want to break them apart and put the race results for each class seperately on a page nested within a tab, like here:
    http://mowersport.com/?page_id=978
    (I realize the 2nd one has larger graphics in the table, but you can ignore that I was testing something)

    In my first example, I had 1 big table. However for the 2nd example I've had to make 10 different tables. Thats alot more cumbersome to do. And after a single race I have 10 times the work to do to make multiple tables etc. I'd like to have just one table... but be able to choose what row is visable. Is there anyway I can make one table and then via shortcode or something else choose to display all columns but say only row 3.
    Then I can use the same shortcode (or whatever) again with a different row number.
    Like [table id=21 row=1,2/] vs [table id=21 row=1,3/].
    I know in the table itself you can choose to hide rows or columns. I need the ability to hide rows/columns (rows in my case specifically) on the wordpress post/page. And on the same page load the same table again hiding other rows.

    It'd save me a ton of work if that is possible. If its not, I'll have to figure out some other way to streamline everything.
    Thanks again for your amazing plugin!

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    yes, this is possible easily, with the "show_rows" and "hide_rows" Shortcode parameters, which are described in the documentation at http://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/documentation/
    They do exactly what you describe.
    (Small note: Make sure to uncheck the "Cache Table Output" checkbox on the "Edit" screen of the table.)

    Now, this task might actually even be easier, with the Filtering Extension http://tobias.baethge.com/2010/03/extension-6-showing-only-rows-that-match-a-filter/
    This allows to have this being done dynamically, so that you won't have to deal with the row numbers.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic