HTML获取表单:如何附加到搜索词

HTML获取表单:如何附加到搜索词,html,forms,search,Html,Forms,Search,我有以下表格: <form role="search" method="get" action="<?php echo esc_url( $destination ); ?>"> <?php do_action( 'searchwp_live_search_widget_before_field' ); ?> <label> <input type

我有以下表格:

        <form role="search" method="get" action="<?php echo esc_url( $destination ); ?>">
            <?php do_action( 'searchwp_live_search_widget_before_field' ); ?>
            <label>
                <input type="search" class="search-field" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="" name="s" data-swplive="true" data-swpengine="<?php echo esc_attr( $engine ); ?>" data-swpconfig="<?php echo esc_attr( $config ); ?>" title="<?php echo esc_attr( $placeholder ); ?>" autocomplete="off">
            </label>
            <input type="hidden" name="post_type=product">
            <div class="flex-col top"> <button type="submit" value=""></button></div>
        </form>
如您所见,我确实插入了一个额外的隐藏输入字段,以便在搜索结果字符串中获取&post_type=product。 然而,最终结果是:

www.site.com/?s=TERM&post_类型%3Dproduct=

=符号被置乱,末尾有一个额外的=。
我如何将&post_type=product附加到我的表单查询中,而不必通过js或类似方式重写?

在隐藏输入中,每个其他输入都有名称和值,因此正确的使用方法是:

<input type="hidden" name="post_type" value="product">