New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TablePress content doesn't show up in search results #39
Comments
Hi, thanks for your question, and sorry for the trouble. I can confirm that the search integration is not working on your site, but unfortunately, I don't see why :-( You are right with the assumption that content that is rendered by Shortcodes is not searched by default. To work around this, TablePress has its own search integration. This basically works by intercepting the search query, searching through all tables, and then extending the actual search to also search for Shortcodes that contain the search term. Unfortunately, other plugins or the theme can sometimes disturb this process. Can you therefore please try again after temporarily deactivating all other plugins and after switchting to a WordPress default theme like Twenty Sixteen? That way, we can find what's causing this. Regards, |
Sure thing, I'll check it out Monday when I'm back in the office. Thanks much :) |
Did these ideas help, @revxx14? |
Sorry I never followed up on this! I was able to get it working with the following:
Not sure it's the most efficient way to do this (I should probably be filtering with regex for the shortcodes specifically), but it works. |
Hi, ah, you were using another plugin that also integrates into the search :-) That explains things a bit. Good to hear that you found a solution! Best wishes, |
Hi, I'm having the same issue with the search function... JacobDB, did you add that snippet of code to your functions.php file? I'm a designer, not a developer and trying to make sure the website I'm building searches the Tablepress table conten for my client... Thanks in advance for your help! |
Hi @Robyn-VS, are you having these issues on a "standard" site or are you maybe using a special search plugin on your site? Best wishes, |
@Robyn-VS yea, that went in my functions.php. That particular snippet is for expanding shortcodes within a custom field, and adding the results to the Relevannsi indexing process. |
Hi @TobiasBg, having these issues on the standard site, I'm not using a special search plugin... I am using it with woo commerce though, I've added tables in the product short descriptions. And thanks @JacobDB - I'm happy to add the relevannsi plugin, if that will make it work! What kind of custom fields would that snippet check? |
Hi @Robyn-VS, thanks for the details! This is a different issue then. You will basically have to find out how to make those "product short descriptions" searchable by WordPress. Depending on how they are stored internally, they might not even be searchable to begin with. Then, if they are searchable, you'd have to make them parse Shortcodes so that those are searched. Regards, |
Hey. I have a very large table and therefore a very long query processing. Loads the table on page and it is necessary to wait 5 - 7 seconds. Then everything works. How can I disable the loading of the entire table and only include the search? |
Hi @zhumakz, I'm afraid that that is not possible at the moment. The search works with JavaScript and this means that all data has to be transferred to the browser before a search can be made :-( Regards, |
Hi, I am using tablepress for my website. I have colored even row and odd row separately. But when I include the search option and reduce the row limit some table showing the color properly with proper row limit and search options but some table not showing the search option and colors for the row. |
Hi @NidhinAS, 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, |
Hi... thanks for your reply.... i did not host my site.... i cannot post the link.... some tables showing the search option... I have added even row color and odd row color.... this is not working in tables when I tick the 'Use the following features of the DataTables JavaScript library with this table' option. |
Hi @NidhinAS, ok, one possible cause for this could be that your table contain Regards, |
Thank you ....yes i have used rowspan and colspan.....one more doubt... i have reduced table width but the search option and pagination appears at the right side of page...is there any way to align with the table width. |
Hi @NidhinAS, 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, |
Hi @NidhinAS, ok, can you please add this to the "Custom CSS" textarea on the "Plugin Options" screen of TablePress: .dataTables_wrapper .tablepress {
width: 100% !important;
} Regards, |
thank you for your immediate reply.... i have to keep the table always 100% width.....if the table width reduced....search and pagination not compacted to the table width... |
Hi @NidhinAS, so you actually want a smaller width? And not 100%? Then, you'd have to reduce the width of the container, like #tablepress-123_wrapper {
width: 500px;
} Regards, |
thank you @TobiasBg ....its workiing..... thank you |
I'm working on a site that uses TablePress, and it seems that content inside of a table isn't showing up in search results. For example, on this page there's a table with a cell that says "USCO-003". Searching for that via the search bar at the top of the page does return a few results, but not the actual correct result (which would be the "Overhead Cutouts" page.
I'm guessing this is because it's using a shortcode to display the table. Is there a way to fix this?
The text was updated successfully, but these errors were encountered: