php - url rewriting or chage urls for wordpress website links -


i've following website built in wordpress http://www.drwagenberg.com/ previous developer has created 4 template pages , creates things in posts different categories.here 1 of template page code

<?php /* template name: detail */ ?><?php get_header(); ?> <?php include (templatepath . '/banner.php'); ?> <div id="inner_servce_bx">   <!-- inner service bx -->  <?php $cat_id=$_get['catid']; ?>  <div id="inner_heading"> <?php  $title = $wpdb->get_results( "select * $wpdb->terms term_id=$cat_id");      foreach ($title $objt)  {     $main_title =  $objt->name; ?>   <div id="inner_hdng_txt"><?php echo $main_title; ?></div>   <?php } ?>   </div>     <div id="servcs_smal_bx">  <!-- service service bx -->  <?php  $service_id = $wpdb->get_results( "select * $wpdb->term_taxonomy parent=7 order term_id asc");  foreach ($service_id $obj)  { $service_cat_id =  $obj->term_id; ?> <?php  $service_name = $wpdb->get_results( "select * $wpdb->terms term_id=$service_cat_id");  foreach ($service_name $obj1)  { $service_cat_name =  $obj1->name; $service_cat_id = $obj1->term_id; ?>          <div id="servcs_smal_bx1">  <!-- servcs smal bx1 -->         <div id="servc_title_bx">  <!-- servc title bx -->           <div id="title_txt"><?php echo $service_cat_name; ?><br/> <span id="title_txt1"><?php echo category_description( $service_cat_id ); ?></span></div> <!-- servc title bx end -->         <?php query_posts("cat=$service_cat_id&meta_key=short_desc" );  ?>               <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>             <div id="servc_sml_img"><?php echo get_post_meta($post->id, 'short_img', true); ?></div> <?php endwhile; ?> <?php endif; ?> </div> <!-- servc title bx end --> <?php query_posts("cat=$service_cat_id&meta_key=short_desc" );  ?>               <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>         <div id="serv_descrip"><?php echo get_post_meta($post->id, 'short_desc', true); ?></div>         <?php endwhile; ?>         <?php endif; ?>         <div id="read_mre1"><a href="index.php/?page_id=53&catid=<?php echo $service_cat_id; ?>">read more...</a></div>         <div id="ser_btm_line"><img src="<?php bloginfo('template_directory'); ?>/images/srvice_line.jpg" width="439" height="42" />         </div>         </div>         <?php } } ?>      </div>  </div> <!-- service service bx end --> <?php get_footer(); ?> 

then on each template page check category called , load category database on template page. urls looks this

http://www.drwagenberg.com/?page_id=101&catid=8 

the permalinks set type

post   http://www.drwagenberg.com/sample-post/ 

is there easy way url's shown in address bar set desired type like

http://www.drwagenberg.com/services-procedures/periodontal-disease 

and how i'll seo optimization???

settings > permalinks

change format want there, using custom structure option. copy , paste below code there , change across website:

%category%/%postname%/ 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -