Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试构建一个自定义搜索form来查询我wordpress DB的结果。我似乎遇到的问题是表单没有发送任何内容来执行操作,只是说404 not found。
form
wordpress DB
404 not found
查询数据库的函数位于,functions/theme-search.php我已function search_db在其中声明。
functions/theme-search.php
function search_db
我哪里错了?
谢谢。
查看这部分代码。这不是防弹的,但我假设第一个WP_Query call是用于搜索
WP_Query call
function my_posts_request_filter($input) { if ( is_search() && isset($_GET['s'])) { global $wpdb; // Make your sql code remove_filter('posts_request','my_posts_request_filter'); } return $input; }