alleyinteractive / alleyinteractive/searchpress

Look into removing fake search term when forcing the search template

未关闭
#162 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
PHP
星标
85
派生
10
PR 合并指标
30 天内没有已合并 PR

描述

### Description

See [this comment](https://github.com/alleyinteractive/searchpress/pull/161#discussion_r1327890323) which prompts this issue.

Some history: 10 years ago ([exactly](https://github.com/alleyinteractive/searchpress/commit/16afca7a51a22662380542135591ce5a648a0457)) when I built the integration, I believe that if the `s` query arg was an empty string, the query would not be considered a "search query" and WordPress wouldn't render the search template. It's certainly possible that that was an oversight on my part, I'm not sure. Regardless, it looks like that's not the case now. Perhaps instead of using a phony search term, we can get away with setting `s` to an empty string.

### Use Case

When a user forces the search template, SP should set `s` to an empty string instead of a phony search term so that the search term will render without inserting a hacky meaningless string.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。