Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.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 wordpress permalink获取上一个单击的链接_Php_Wordpress - Fatal编程技术网

Php wordpress permalink获取上一个单击的链接

Php wordpress permalink获取上一个单击的链接,php,wordpress,Php,Wordpress,我已显示所选类别的标题。这是一个锚定标签,但永久链接不起作用。这里有什么问题?这是得到旧的链接,可能在某个地方刚刚点击。但不适用于确切的类别 <a class="heading-link" href="<?php the_permalink(); ?>"> <?php query_posts('cat=4&showposts=1'); if (have_po

我已显示所选类别的标题。这是一个锚定标签,但永久链接不起作用。这里有什么问题?这是得到旧的链接,可能在某个地方刚刚点击。但不适用于确切的类别

        <a class="heading-link" href="<?php the_permalink(); ?>">           
         <?php

            query_posts('cat=4&showposts=1');

         if (have_posts()) : 
           while (have_posts()) : the_post();

         the_title();

         endwhile;
        endif;

        wp_reset_query();

             ?>    
   </a>

place

<?php

        query_posts('cat=4&showposts=1');

     if (have_posts()) : 
       while (have_posts()) : the_post(); ?>

    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>

    <?php  endwhile;
    endif;

    wp_reset_query();

         ?>