Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 无法访问营地选择自定义_Php_Wordpress - Fatal编程技术网

Php 无法访问营地选择自定义

Php 无法访问营地选择自定义,php,wordpress,Php,Wordpress,我打算访问一个选举类型的子阵营,即成语>成语,这里省略了一系列成语,它们之间是“英语”。但是,当英国巴士搜索者没有给我任何日期 <?php /* EL PROBLEMA ES QUE NO ES UN VALOR DE TEXTO SINO UN SELECT Y SE GUARDA EN LA BASE DE DATOS COMO MATRIZ SERIALIZADA, SE DEBE MODIFICAL LA META CONSULTA */ require_once(&quo

我打算访问一个选举类型的子阵营,即成语>成语,这里省略了一系列成语,它们之间是“英语”。但是,当英国巴士搜索者没有给我任何日期

<?php
/*

EL PROBLEMA ES QUE NO ES UN VALOR DE TEXTO SINO UN SELECT Y SE GUARDA
EN LA BASE DE DATOS  COMO MATRIZ SERIALIZADA, SE DEBE MODIFICAL LA META CONSULTA

*/

require_once("../wp-load.php");
switch_to_blog(5);
echo '
    <form class="form form--search" action="" method="post">
        <fieldset>
            <div>
                <input type="hidden" name="custom_field" value="field_57c7fadfc5635" />
                <input type="search" name="s" class="search__input" placeholder="Buscar por organización" />
                <button type="submit" class="button button--submit">Submit</button>
            </div>
        </fieldset>
    </form>
';
//AJAX
$args = array(
    'post_type'              => array( 'profesiones' ),
    'posts_per_page'         => -1,
    'post_status'            => array( 'publish' ),
    'meta_key'               => 'nombre_profesion',
    'meta_query'             => array(
        array(
                'relation'  => 'AND',
                array(
                    'key'     =>  $_POST['custom_field'],
                    'value'   =>  $_POST['s'],
                    'compare' => 'LIKE'
                )
            )
    ),
    'orderby'    => 'meta_value',
    'order'     => 'ASC',
);
$query = new WP_Query( $args );
if ( $query->have_posts() ) : 
    echo '<table border="1">
    <thead>
        <tr>
            <th>Nombre de la profesion</th>
        </tr>
    </thead>
    <tbody>';
    while ( $query->have_posts() ) :
        $query->the_post();
        echo '<tr>
                <td><a href="'.get_the_permalink().'">'.get_field('plural').'</a></td>
            </tr>';
    endwhile;
    echo '</tbody>
    </table>';
endif;
wp_reset_query();
restore_current_blog();
?>

我无法访问我不知道“field57c7fadfc5635”是否错误,也就是说,在正确的位置,我看到过类似的示例,所以我猜这不是错误

现在的问题可能是它不是一个文本,而是一个合格的字段,其行为与文本不同