• Resolved santirisco

    (@santirisco)


    Hi there Tobias, I now that this is a recurrent topic, but after search old answers, couldn’t manage to make it work. What I need is to have all table hidden and show only results after user fills something in search box. I’ve followed the indications in previous threads but not lucky. This is what I’ve done so far: install premium extension inverted filter and row filter. Added the page slug as indicated in inverted filters. I don’t know what else can I do.

    Best
    Santi

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    You actually have multiple options here, depending on whether you find a “live” search, or a static filtering.
    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

    Thread Starter santirisco

    (@santirisco)

    Wow, that’s what i call a fast answer! Here’s a link with only the table:

    http://nbi.multiplica.us/tobias/

    Thanks
    Santi

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link!

    So, assuming that you downloaded, installed, AND activated the TablePress Extension from https://tablepress.org/extensions/datatables-inverted-filter/ :
    This should then work once you change the line

    if ( ! is_page( array( 'page-slug-1', 'page-slug-1' ) ) ) {
    

    to

    if ( ! is_page( array( 'tobias' ) ) ) {
    

    (Note how the “tobias” from the URL appears again. Once you move the table to its proper page, you’d have to adjust that in the code again.)

    Regards,
    Tobias

    Thread Starter santirisco

    (@santirisco)

    Sorry, I just realize that I was working in localhost and hadn’t upload the extension for your test page, just uploaded and activated.

    Best
    Santi

    Thread Starter santirisco

    (@santirisco)

    Amazing, it’s working in /tobias/ but not in the page where it should work, here: http://nbi.multiplica.us/s/business-insurance/small-business-insurance/

    (It’s also in the array), like this:

    if ( ! is_page( array( 'small-business-insurance', 'tobias' ) ) ) {
    		return $commands;
    	}

    I’ve try also with the long slug ( s/business-insurance/small-business-insurance ) but no success.

    Can it be a conflict with Elementor?

    Really appreciate your help, Tobias

    S.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    I think the cause for this is that that page is not actually a “page”, but a Custom Post Type “solution”. Therefore, we might need a different function. Can you please try again with

    if ( ! is_single( array( 'small-business-insurance' ) ) ) {
    

    Regards,
    Tobias

    Thread Starter santirisco

    (@santirisco)

    AHhh! Now seems obvious (and it’s working like a charm). Really really appreciate your help. thank you very very much, Tobias, I’ll increase our donation to your plugin, your assistance is really pro level.

    Best!
    Santi

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!
    And thanks for the donation, I really appreciate it!

    Best wishes,
    Tobias

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

The topic ‘Show only matching rows’ is closed to new replies.