• 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 - 16 through 30 (of 37 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This is not trivial, but possible. For details, please see https://www.ads-software.com/support/topic/i-want-the-table-to-be-invisible-until-filter-is-applied/#post-4272342

    Regards,
    Tobias

    Thanks for the suggestion. I downloaded/installed the datatables inverted filter plugin and changed line 22 from /** to /caterpillar-engine-model-numbers-prefixes but it made my entire site unreachable.

    I think I will just display my table in the standard fashion for now.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    my bad, the necessary changes are in line 32, where you have to modify the
    if ( ! is_page( array( 'page-slug-1', 'page-slug-1' ) ) ) {
    to contain your desired pages’ slugs.

    Regards,
    Tobias

    Ok, thanks for the clarification.

    Do I include the trailing slash?

    Also, what is the correct syntax if I only want to use this display method on one page?

    if ( ! is_page( array( '/caterpillar-engine-model-numbers-prefixes', '/caterpillar-engine-model-numbers-prefixes' ) ) ) {
    or
    if ( ! is_page( array( '/caterpillar-engine-model-numbers-prefixes', ) ) ) {

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

    (@tobiasbg)

    Hi,

    it would be the second version, with just one entry in the array. Also, the / has to be removed.

    Regards,
    Tobias

    Hi Tobias,

    Thanks for the continued help. I edited line 32 per your suggestion but it did not work — it does not affect the table at all.

    Maybe TablePress is not be the best solution for my specific needs, or I just let TablePress display a set number of rows and enable pagination.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s strange. Is the Extension really activated as a plugin?

    Regards,
    Tobias

    Yes, I uploaded and activated the plugin, and edited line 32 per your instructions, but the table did not change at all. I tried flushing the cache & turning pagination on and off but it didn’t make a difference — the table always looked exactly the same. I was using the default TablePress shortcode.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    https://hdpowerequipment.com/caterpillar-engine-model-numbers-prefixes/

    Unfortunately, I have already deactivated/deleted the plugin. I can reinstall it later today when I am back in front of my computer.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that would be necessary, if you want me to take a deeper look ??

    Regards,
    Tobias

    Ok, here are the steps I just did:

    – Installed & activated the TablePress Inverted Filters plugin
    – FTP to webroot/wp-content/plugins/tablepress-datatables-inverted-filter &
    downloaded tablepress-datatables-inverted-filter.php
    – Edited file to look like this (showing lines 30 – 34):

    function tablepress_datatables_inverted_filter( $commands ) {
    	// Only use this functionality on these pages:
    	if ( ! is_page( array( '/caterpillar-engine-model-numbers-prefixes/' ) ) ) {
    		return $commands;
    	}

    – Uploaded edited file
    – TablePRess settings for this table are set to show all rows (no pagination)
    – Shortcode used is: [table id=1 /]

    As you can see, the entire table is visible.

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

    (@tobiasbg)

    Hi,

    as I said above, please remove the / ??

    Regards,
    Tobias

    Hi Tobias,

    Sorry about that, I have too many versions of this php file sitting on my desktop and must have uploaded the wrong file — whoops!. Anyway, I have removed the trailing slash from the URL and then cleared the cache, but it does not seem to make a difference.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    that’s really weird then ?? Sorry that I can not help with a working solution here.

    Regards,
    Tobias

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