Have Asgaros Forum Posts show up in WordPress Core's Search
Quote from bryancasler on July 11, 2018, 7:20 pmI’m interested in having Asgaros Forums Posts show up in WordPress Core’s default search. Is this something that can be done via a plugin or will require custom development? If custom development, could you point me in the right direction?
I’m interested in having Asgaros Forums Posts show up in WordPress Core’s default search. Is this something that can be done via a plugin or will require custom development? If custom development, could you point me in the right direction?
Quote from bryancasler on July 11, 2018, 7:21 pmWould something like https://searchwp.com/ work because it searches “Custom Fields Content”?
Would something like https://searchwp.com/ work because it searches “Custom Fields Content”?
Quote from Asgaros on July 12, 2018, 8:04 pmHello @bryancasler
When I developed the search-functionality I planned to integrate search-results directly into the WordPress Core search functionality. The problem why I implemented my own search-engine at the end was the lack of an official search API which can be used to search content inside custom tables. Of course it would be possible to add the results to the core which some hardcoded query-modifications via filters and hooks. You can find an example in the old ticket here:
https://github.com/Asgaros/asgaros-forum/issues/7
But this would lead to a lot of problems, for example possible incompatibilities with other plugins and the risk, that after an update of WordPress the search-functionality would not work anymore.
As mentioned before, Asgaros Forum uses its own tables and not custom-fields inside of custom WordPress post-types. So if there is a plugin which supports querying above custom database tables, there will be a chance that it works. Otherwise you have to apply the before mentioned core-hack which is very risky.
Hello @bryancasler
When I developed the search-functionality I planned to integrate search-results directly into the WordPress Core search functionality. The problem why I implemented my own search-engine at the end was the lack of an official search API which can be used to search content inside custom tables. Of course it would be possible to add the results to the core which some hardcoded query-modifications via filters and hooks. You can find an example in the old ticket here:
https://github.com/Asgaros/asgaros-forum/issues/7
But this would lead to a lot of problems, for example possible incompatibilities with other plugins and the risk, that after an update of WordPress the search-functionality would not work anymore.
As mentioned before, Asgaros Forum uses its own tables and not custom-fields inside of custom WordPress post-types. So if there is a plugin which supports querying above custom database tables, there will be a chance that it works. Otherwise you have to apply the before mentioned core-hack which is very risky.
Quote from bryancasler on July 12, 2018, 10:08 pmThanks for the response. Having that link in Github could prove helpful. For the current site I’m working on I ended up removing the sitewide search and implemented a search bar (via WPSearch and FacetsWP) only on Resources Pages, with a search that only returns Resource. I think this will work in this instance, but not sure about future scenarios. If I end up doing any work on this I’ll see if it’s anything I can contribute back.
Thanks for the response. Having that link in Github could prove helpful. For the current site I’m working on I ended up removing the sitewide search and implemented a search bar (via WPSearch and FacetsWP) only on Resources Pages, with a search that only returns Resource. I think this will work in this instance, but not sure about future scenarios. If I end up doing any work on this I’ll see if it’s anything I can contribute back.
Quote from daron4ever on August 8, 2018, 1:48 pmI use Ajax Search pro plugin and it is bad that the posts can’t show up the Wordpress Core search.
I use Ajax Search pro plugin and it is bad that the posts can’t show up the Wordpress Core search.