Title: Post Permalink
Last modified: August 20, 2016

---

# Post Permalink

 *  [himu](https://wordpress.org/support/users/himu/)
 * (@himu)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/post-permalink/)
 * hello,
 * i am using this code to show the posts filter by city every thing is ok but post
   permalink is not coming exactly what it is???
    -  <?php
       $i=0; global $current_user; $userid=$current_user->ID; $userquery=
      mysql_query(“select * from user_hood where userid=’$userid’ and status=1”);
      $userrow=mysql_fetch_array($userquery); $user_hood_name=$userrow[‘hood_name’];
    - $cityquery=mysql_query(“select city_id from wp_adminmulticity where cityname
      =’$user_hood_name'”);
       $cityrow=mysql_fetch_array($cityquery); $user_hood_id
      =$cityrow[‘city_id’]; $userlisting_query=mysql_query(“select * from wp_adminpostmeta
      where meta_key=’post_city_id’ and meta_value=’$user_hood_id'”); while($userlist_row
      =mysql_fetch_array($userlisting_query)) { $i++; $my_postid = $userlist_row[‘
      post_id’];//This is page id or post id $post_id_7 = get_post($my_postid, ARRAY_A);
    - $content_post = get_post($my_postid);
       $content = $content_post->post_content;
      $content = apply_filters(‘the_content’, $content); $title = $post_id_7[‘post_title’];
      $content = str_replace(‘]]>’, ‘]]>’, $content); ?>
    - <li class=”recent-post-item”>
       ” class=”post-title”><?php echo $title; ?>
      
      
      <?php $full_content=substr(the_excerpt(),0,100);
    - ?>
    - <?php
       } ?>

The topic ‘Post Permalink’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [himu](https://wordpress.org/support/users/himu/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/post-permalink/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
