• Resolved albertcoma

    (@albertcoma)


    Hi!
    Is it possible to combine the filter_date and the filter in a shortcode?
    I want to filter by date with the parameter “future” and use filter to filter by a text “SHOW”.

    When I create the shortcode an error appear. This is the shortcode:

    [table id=DEF filter_columns=2 filter=”SHOW” filter_date=future filter_date_columns=1 hide_columns=1,2 datatables_multi_filter_select=true /]

    THANKS!

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This should work, in principle. What error are you seeing?

    Regards,
    Tobias

    Thread Starter albertcoma

    (@albertcoma)

    Hi Tobias,
    I saw that my question is not clear, sorry.

    The combination of both filters works you are right.

    I desire to filter by hierarchy: first the “word” and then the “date”? Is it possible?

    thanks!

    Thread Starter albertcoma

    (@albertcoma)

    Hi Tobias,

    Or in another words: I have a list of shows separated by a line where the month is written, like that:

    June2022
    5 June show place
    7 June show place
    ….
    July 2022
    13 July show place
    20 July show place
    ….

    When I use the the filter by date with the filter “future” the rows “June2022 and July2022” desapear. I have an idea to achive that filtering and is for that I’m asking for the hierarchy.
    But maybe exist a different way to achive that?

    Thanks!
    albert

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the example! I don’t think that “switching” the filtering (first the word, then the date) will help here. This would still result in the same outcome, simply because this is an “AND” filtering.

    Essentially, what you’l need to do is assign an actual date to the June 2022 and July 2022 rows as well (something far in the future, maybe). This could be in a a new hidden column so that it’s not visible to the user.

    Regards,
    Tobias

    Thread Starter albertcoma

    (@albertcoma)

    Hi Tobias,
    Thanks for your tip, I’m happy with the results.
    But now, on the top of the page (in edit mode, I use Elementor) appear this message:
    Warning: count(): Parameter must be an array or an object that implements Countable in /usr/home/xavierbobes.com/web/wp-content/plugins/tablepress/classes/class-evaluate.php on line 73

    When I see the page (non edit mode) the warning dosen’t appear…

    Any ideas?! Thank you very much!
    albert

    Thread Starter albertcoma

    (@albertcoma)

    Hi Tobias,

    In fact the error just appear when I copy the shortcode inside a Toggle Widget (Elementor).

    Any idea?
    thanks!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    this warning can only happen when a table is empty. Could this be the case because the table filtering returns no results?
    Regardless, you can ignore the warning here. (It should actually not be visible on production sites, if you set the WP_DEBUG constant to false in your site’s wp-config.php file.)

    Regards,
    Tobias

    Thread Starter albertcoma

    (@albertcoma)

    Thanks Tobias!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    sure, no problem! Always happy to help!

    Best wishes,
    Tobias

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

The topic ‘Filter_date && filter’ is closed to new replies.