• Resolved zreece3

    (@zreece3)


    I am using tablepress and have large amount of rows in each table. This same table would be used on two different pages. One page is solely designed for the entire table example is https://trxctiming.com/wp2/track-field/track-field-meet-information/ and I want to show all of the events on the screen I do not want to only show 10 rows, I want to show all of the rows I have on the table in this page.

    The other place I want to put this table is on my home page but I only want to show 10 rows max. Because the table I gave an example to is always changing currently I have to have two identical tables and edit information in both of them almost every day.

    I would love to know how I can take one Tableid and make it show only 10 rows on a separate page

    I have tried putting this into my home page but it does nothing it does not even show me the table anymore. Any advice would be nice
    [table id=1 show_rows=”1,2,3,4,5,6,7,8″ /]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Please try

    [table id=1 hide_rows="all" show_rows="1-8" /]
    

    This should then only show rows 1 through 8.
    Please try making these changes in the “Text” and not the “Visual” editor to prevent that other HTML code gets added accidentally.

    Regards,
    Tobias

    Thread Starter zreece3

    (@zreece3)

    That did it.

    Why do you have to include the hide_rows snippit into the code?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    basically, we’ll first have to hide all rows (as showing all rows is the default) and then re-show the desired rows.
    The show_rows parameter is basically honored in addition to whatever visibility state has been set before. So, when all rows are already visible (by default) nothing changes. That’s why we have to hide everything first.

    Regards,
    Tobias

    Hello! I am having the same issue and this coding does not work for me. Any thoughts as to why?

    Here’s the webpage: https://sites.tufts.edu/mediastockroom/cables-adapters/
    (Note the “cables” table has 3 pages).

    This is what I have typed:

    [table id=5 hide rows=”all” show_rows=”1-28″ /]

    Thank you!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi cassandraklos,

    I’m not sure what you mean. This Shortcode would first hide all rows and then again show the rows 1-28 (where “show” means “send to the browser”).
    This is what I see on that page.

    What exactly is not working here?

    (Even though 28 rows are sent to the browser, you can only see 10 at a time, as you are using pagination by the FooTable plugin.)

    Regards,
    Tobias

    • This reply was modified 7 years, 8 months ago by Tobias B?thge.

    Hi Tobias,

    Thanks for your help! I guess I mean, I would like to see all rows without going to another page. On the bottom of the table, it has a >>2>> and >>3>> button… at least that is what I’m seeing!

    Thanks,
    Cassandra

    Here is a screenshot of what I’m talking about:

    View post on imgur.com

    Thank you!
    Cassandra

    • This reply was modified 7 years, 8 months ago by cassandraklos.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Cassandra,

    thanks for the clarification!

    What you are seeing there are the (broken) pagination controls of the FooTable plugin. To get rid of these, please deactivate/uninstall the FooTable plugin (if you are not using it anywhere) or at least turn off the TablePress integration in its settings.

    Regards,
    Tobias

    Hi!

    This shortcode I just discovered and is very helpful when using variations of one table.

    However, I notice that the order the id is added to the shortcode is ignored and is instead sorted by the original table id itself.

    For example if I put: [table id=1 hide_rows=”all” show_rows=”1,65,2,3,4″ /] it will still display the table in the following order: 1,2,3,4,65. Or am I thinking completely wrong here?

    The problem is when fetching id:s like this in my situation is that if I want to add a new row to the “mother table” and then move that new row to the top it will change ALL id’s and thus add rows on existing pages where I have fetched from the mother table with this short code that should be there.

    So problem is that when I add a new row I must be able to leave it at the bottom but still move it to the top on some pages with this shortcode which I dont seem to be able to do.

    Sorry, tried to explain to the best of my ability but maybe its too confusing?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    the show_rows parameter will indeed not respect the order that you chose. It really only uses the information to find which rows to display, in their natural order.

    If you want to keep the order, you could use the TablePress Extension from https://tablepress.org/extensions/table-row-order/
    This also has a parameter that allows to set an actual order:

    [table id=123 row_order=manual row_order_manual_order=1-3,6,3 /]
    

    Regards,
    Tobias

    Wow awesome, thank you so much for the reply! This will be very useful.

    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!

    I have a client who whats to remove the default option of showing 10 rows and start with showing 25 rows. Is there a way of doing this? Thanks.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Just change the 10 to 25 in the “Features of the DataTables JS library” section on the table’s “Edit” screen.

    Regards,
    Tobias

    Hi Tobias,

    First off, thank you very much for building such a fantastic plugin.

    I am using Tablepress at this page: https://hdpowerequipment.com/caterpillar-engine-model-numbers-prefixes/

    Basically, I do not want to show any rows except for the search box (or only one row if displaying zero rows is not possible). I only want to show the filtered rows after the user has entered their search criteria into the search box.

    Is this possible? I have tried the suggestions listed in this thread but they do not seem to work in my situation.

    Any ideas?

Viewing 15 replies - 1 through 15 (of 37 total)
  • The topic ‘Row Filtering: Show only a Certain number of Rows’ is closed to new replies.