• 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.