Title: Permalink doesn&#8217;t navigate to post (changes only url)
Last modified: November 15, 2019

---

# Permalink doesn’t navigate to post (changes only url)

 *  [mak7](https://wordpress.org/support/users/mak7/)
 * (@mak7)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/permalink-doesnt-navigate-to-post-changes-only-url/)
 * Hi. I don’t know why, but I can’t navigate to post by click. I have tried get_permalink()
   and the_permalink() but changes only url. And i need to see only post that was
   pushed (alone) after click. Does anybody know what I’m doing wrong ?<
 *     ```
       <?php
   
       $args = array(
           'post_type'=> 'post'
       );
       $the_query = new WP_Query( $args );
   
       // The Loop
       if ( $the_query->have_posts() ) {
           while ( $the_query->have_posts() ) {
               $the_query->the_post(); ?>
               <h2><a href="<?php the_permalink();  ?>"><?php the_title(); ?></a></h2>
             <p><?php the_content(); ?></p>
              <?php
           }
       }
       ?>
       ```
   
    -  This topic was modified 6 years, 7 months ago by [mak7](https://wordpress.org/support/users/mak7/).
    -  This topic was modified 6 years, 7 months ago by [mak7](https://wordpress.org/support/users/mak7/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/permalink-doesnt-navigate-to-post-changes-only-url/#post-12139003)
 * I think you may have placed your code on the wrong template, such that is used
   for single post requests. Your code overrides whatever the original request was.
   Why do you create a new WP_Query? WP should give you the same list of posts without
   any custom code by going to either your front page or the blog index page, depending
   on your settings.
 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [6 years, 7 months ago](https://wordpress.org/support/topic/permalink-doesnt-navigate-to-post-changes-only-url/#post-12139398)
 * Howdy!
 * How are you using this code?
 * Personally, my first question is: what are you trying to achieve? I think this
   will help narrow down what could be the issue and we may able to provide a better
   answer as well.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Permalink doesn’t navigate to post (changes only url)’ is closed to new
replies.

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/permalink-doesnt-navigate-to-post-changes-only-url/#post-12139398)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
