在Wordpress存档页面中清空$ _POST

I have a custom form in my wordpress theme archive.php file but I can't get the post of that form. It's empty.

I have these:

<?php print_r($_POST); ?>
<div class="filtros">
    <h3>Búsqueda de documentos</h3>
    <form action="#" method="post">
        <input type="text" id="name" name="f_name" placeholder="Buscar" value="<?php echo $_POST['f_name']; ?>" />
        <div class="dates">
            <input type="text" id="inicio" class="date" name="f_inicio" placeholder="Fecha de inicio" value="<?=$_POST['f_inicio']?>" /> / 
            <input type="text" id="final" class="date" name="f_final" placeholder="Fecha final"  value="<?=$_POST['f_final']?>" />
        </div>
        <div class="submit"><input type="submit" value="Buscar" /></div>
    </form>
</div>

Even if I pass the variables throw the URL I cant get that vars with $_GET.

¿Any idea?

While it's not advisable from a security point of view, you can change the method on your form from method="post" to method="get" to have variables posted as $_GET variables instead.

Change action="#" to action="<? echo $_SERVER['REQUEST_URI']?>"

Try change <?= to <? echo

You may need to point the action="myfile.php" to specific file.. See the solutions here: $_POST returns empty on form submit in wordpress