WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] search / organise as database (10 posts)

  1. MRA_Andy
    Member
    Posted 1 year ago #

    Hi Tobias,

    First thanks for your awesome work. TablePress looks fantastic and even better than WP Table did.

    I have a lot of tables on my website and had them on my own website organised with a mysql database. Now I switched to wordpress and use TablePress to import them via csv. Works perfect.

    Now my questions are:
    1. There is a searchbox in the admin-area where you can search in all tables. Is it possible (or will it be possible in future) to give all users of my website this feature, so they can search in all tables and get back results (with a comment in which table it was found)
    2. As my tables have a certain categorisation, is it possible to group/categorise them via Metadata?

    Thanks for your advice.

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post! Nice to hear that you like the plugin!

    1. Adding that search box for users is not possible with the built-in functions. This would have to be developed in a custom script. However, and maybe that is already enough for your use case, TablePress tables are searched when using the regular WordPress Search feature (on the frontend of a site), if the table is embedded in to a post/page via its Shortcode.

    2. I'm thinking about somehow adding the WP category/tagging system to tables. Unfortunately, I'm not aware of a currently working solution for this, sorry.

    Best wishes,
    Tobias

  3. MRA_Andy
    Member
    Posted 1 year ago #

    Thank you for answering my questions.

    Didn´t know that WordPress will find linked content on pages too.
    Results don´t show up in my case though but that may be due to the theme I use...

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    that's weird. Can you maybe post a link to one of your tables, so that I can check?

    Regards,
    Tobias

  5. MRA_Andy
    Member
    Posted 1 year ago #

    I´m currently working on the site offline. Will post here when I find a solution.

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ok, sounds good!

    Best wishes,
    Tobias

  7. MRA_Andy
    Member
    Posted 1 year ago #

    Found that in the functions.php of my theme and deleted it

    // EXCLUDE PAGES FROM SEARCH RESULTS
    
        function SearchFilter($query) {
        if ($query->is_search) {
        $query->set('post_type', 'post');
        }
        return $query;
        }
    
        add_filter('pre_get_posts','SearchFilter');

    Have to arrange the results on the template a bit and it´s fine.
    Tables are also among the results now :-)

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    yes, that's kind of weird by your theme. I don't they why it should restrict search results to just posts...
    But great to hear that tables are now searched :-)

    Best wishes,
    Tobias

  9. plugins_lexblog
    Member
    Posted 1 year ago #

    The theory there is pretty common: A lot of blogs might have a page called "Privacy Policy". So, consider if it's a legal blog about IP Law & Privacy: That page is not relative to most searches.

    IMO that snippet is poorly executed though and should sniff for is_admin and is_main_query. We take it a step further and specifically exclude such pages by slug instead of post_type.

  10. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ah, ok. Yes, that might be valid use case. And I agree, excluding pages by slug or ID is much saner in that case.

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic