title: Add Read More Button to Wordpress Custom Post Type
body: <p>I'm in need on making some changes on Point Finder Wordpress Theme. </p>
  
  <p>I Need to add a read more button to the custom postype posts for "Properties" that are displayed on the Listings page, just like it would show on most blog posts. First the excerpt and then a read more link or button below it.</p>
  
  <p>I see that under the theme files there is the archive.php where the code for the listings archive is. But i'm not sure what to look at here to find a way to make this modification. </p>
  
  <p>Here is the code for that File:</p>
  
  <pre><code>&lt;?php 
  
  get_header();
  
  
  
      global $wp_query;
  
      $pf_category = 0;
  
      $pf_mapheader_arr = array('pointfinderltypes'=&gt;'','pointfinderitypes'=&gt;'','pointfinderlocations'=&gt;'','pointfinderfeatures'=&gt;'','pointfinderconditions'=&gt;'',);
  
      $get_termname = $get_term_nameforlink = '';
  
      if(isset($wp_query-&gt;query_vars['taxonomy'])){
  
          $taxonomy_name = $wp_query-&gt;query_vars['taxonomy'];
  
          if (in_array($taxonomy_name, array('pointfinderltypes','pointfinderitypes','pointfinderconditions','pointfinderlocations','pointfinderfeatures'))) {
  
  
  
              $term_slug = $wp_query-&gt;query_vars['term'];
  
              $pf_category = 1;
  
              $term_name = get_term_by('slug', $term_slug, $taxonomy_name,'ARRAY_A');
  
  
  
              $get_termname = $term_name['name'];
  
              $get_term_nameforlink = '&lt;a href="'.get_term_link( $term_name['term_id'], $taxonomy_name ).'" title="' . esc_attr( sprintf( esc_html__( "View all posts in %s","pointfindert2d" ), $term_name['name']) ) . '"&gt;'.$term_name['name'].'&lt;/a&gt;';
  
  
  
              if (!empty($term_name['parent'])) {
  
                  $term_parent_name = get_term_by('id', $term_name['parent'], $taxonomy_name,'ARRAY_A');
  
                  $get_termname = $term_parent_name['name'].' / '.$term_name['name'];
  
                  $get_term_nameforlink = '&lt;a href="'.get_term_link( $term_name['parent'], $taxonomy_name ).'" title="' . esc_attr( sprintf( esc_html__( "View all posts in %s","pointfindert2d" ), $term_parent_name['name']) ) . '"&gt;'.$term_parent_name['name'].'&lt;/a&gt; / '.'&lt;a href="'.get_term_link( $term_name['term_id'], $taxonomy_name ).'" title="' . esc_attr( sprintf( esc_html__( "View all posts in %s","pointfindert2d" ), $term_name['name']) ) . '"&gt;'.$term_name['name'].'&lt;/a&gt;';
  
              }
  
  
  
              $filter_text = '';
  
  
  
              switch ($taxonomy_name) {
  
                  case 'pointfinderltypes':
  
                      $filter_text .= 'listingtype = "'.$term_name['term_id'].'"';
  
                      $pf_mapheader_arr['pointfinderltypes'] = $term_name['term_id'];
  
                      break;
  
  
  
                  case 'pointfinderitypes':
  
                      $filter_text .= 'itemtype = "'.$term_name['term_id'].'"';
  
                      $pf_mapheader_arr['pointfinderitypes'] = $term_name['term_id'];
  
                      break;
  
  
  
                  case 'pointfinderlocations':
  
                      $filter_text .= 'locationtype = "'.$term_name['term_id'].'"';
  
                      $pf_mapheader_arr['pointfinderlocations'] = $term_name['term_id'];
  
                      break;
  
  
  
                  case 'pointfinderfeatures':
  
                      $filter_text .= 'features = "'.$term_name['term_id'].'"';
  
                      $pf_mapheader_arr['pointfinderfeatures'] = $term_name['term_id'];
  
                      break;
  
  
  
                  case 'pointfinderconditions':
  
                      $filter_text .= 'conditions = "'.$term_name['term_id'].'"';
  
                      $pf_mapheader_arr['pointfinderconditions'] = $term_name['term_id'];
  
                      break;
  
              }
  
  
  
          }
  
      }
  
  
  
  
  
  
  
      $setup3_pointposttype_pt1 = PFSAIssetControl('setup3_pointposttype_pt1','','pfitemfinder');
  
      $setup22_searchresults_defaultppptype = PFSAIssetControl('setup22_searchresults_defaultppptype','','10');
  
      $setup22_searchresults_defaultsorttype = PFSAIssetControl('setup22_searchresults_defaultsorttype','','ASC');
  
      $setup22_searchresults_defaultsortbytype = PFSAIssetControl('setup22_searchresults_defaultsortbytype','','ID');
  
  
  
      if ($pf_category == 0) {
  
          $setup_item_blogcatpage_sidebarpos = PFASSIssetControl('setup_item_blogcatpage_sidebarpos','','2');
  
          if(function_exists('PFGetDefaultPageHeader')){PFGetDefaultPageHeader();}
  
          echo '&lt;div class="pf-blogpage-spacing pfb-top"&gt;&lt;/div&gt;';
  
          echo '&lt;section role="main"&gt;';
  
              echo '&lt;div class="pf-container"&gt;';
  
                  echo '&lt;div class="pf-row"&gt;';
  
                      if ($setup_item_blogcatpage_sidebarpos == 3) {
  
                          echo '&lt;div class="col-lg-12"&gt;';
  
  
  
                              get_template_part('loop');
  
  
  
                          echo '&lt;/div&gt;';
  
                      }else{
  
  
  
                          if($setup_item_blogcatpage_sidebarpos == 1){
  
                              echo '&lt;div class="col-lg-3 col-md-4"&gt;';
  
                                  if (is_active_sidebar( 'pointfinder-blogcatpages-area' )) {
  
  
  
                                      get_sidebar('catblog' );
  
                                  } else {
  
                                      get_sidebar();
  
                                  }
  
  
  
                              echo '&lt;/div&gt;';
  
                          }
  
  
  
                          echo '&lt;div class="col-lg-9 col-md-8"&gt;'; 
  
  
  
                          get_template_part('loop');
  
  
  
                          echo '&lt;/div&gt;';
  
                          if($setup_item_blogcatpage_sidebarpos == 2){
  
                              echo '&lt;div class="col-lg-3 col-md-4"&gt;';
  
                                  if (is_active_sidebar( 'pointfinder-blogcatpages-area' )) {
  
                                      get_sidebar('catblog' );
  
                                  } else {
  
                                      get_sidebar();
  
                                  }
  
                              echo '&lt;/div&gt;';
  
                          }
  
  
  
                      }
  
                  echo '&lt;/div&gt;';
  
              echo '&lt;/div&gt;';
  
          echo '&lt;/section&gt;';
  
          echo '&lt;div class="pf-blogpage-spacing pfb-bottom"&gt;&lt;/div&gt;';
  
  
  
      }else{
  
          $general_ct_page_layout = PFSAIssetControl('general_ct_page_layout','','1');
  
  
  
          if ($general_ct_page_layout == 1) {
  
  
  
              $pointfinderltypesas_vars = get_option('pointfinderltypesas_vars');
  
              $pf_cat_imagebg = (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_imagebg']))? $pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_imagebg']: 2;
  
  
  
              if ($pf_cat_imagebg == 1) {
  
                  if(function_exists('PFGetDefaultCatPageHeader')){
  
                      PFGetDefaultCatPageHeader(
  
                          array(
  
                              'taxname' =&gt; $get_termname,
  
                              'taxnamebr' =&gt; $get_term_nameforlink,
  
                              'taxinfo'=&gt;$term_name['description'],
  
                              'pf_cat_textcolor' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_textcolor']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_textcolor']:'',
  
                              'pf_cat_backcolor' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_backcolor']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_backcolor']:'',
  
                              'pf_cat_bgimg' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgimg']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgimg']:'',
  
                              'pf_cat_bgrepeat' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgrepeat']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgrepeat']:'',
  
                              'pf_cat_bgsize' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgsize']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgsize']:'',
  
                              'pf_cat_bgpos' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgpos']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_bgpos']:'',
  
                              'pf_cat_headerheight' =&gt; (isset($pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_headerheight']))?$pointfinderltypesas_vars[$term_name['term_id']]['pf_cat_headerheight']:'',
  
                          )
  
                      );
  
                  }
  
              }else{
  
                  if(function_exists('PFGetDefaultPageHeader')){
  
                      PFGetDefaultPageHeader(
  
                          array(
  
                              'taxname' =&gt; $get_termname,
  
                              'taxnamebr' =&gt; $get_term_nameforlink,
  
                              'taxinfo'=&gt;$term_name['description']
  
                          )
  
                      );
  
                  }
  
              }
  
          }
  
  
  
          /* Map Header */
  
          if ($general_ct_page_layout == 2) {
  
  
  
              /* Get Variables and apply */
  
              $setup42_searchpagemap_height = PFSAIssetControl('setup42_searchpagemap_height','height','550');
  
              $setup42_mheight = PFSAIssetControl('setup42_mheight','height','350');
  
              $setup42_theight = PFSAIssetControl('setup42_theight','height','400');
  
  
  
              $setup42_searchpagemap_lat = PFSAIssetControl('setup42_searchpagemap_lat','','');
  
              $setup42_searchpagemap_lng = PFSAIssetControl('setup42_searchpagemap_lng','','');
  
              $setup42_searchpagemap_zoom = PFSAIssetControl('setup42_searchpagemap_zoom','','12');
  
              $setup42_searchpagemap_mobile = PFSAIssetControl('setup42_searchpagemap_mobile','','10');
  
              $setup42_searchpagemap_type = PFSAIssetControl('setup42_searchpagemap_type','','ROADMAP');
  
              $setup42_searchpagemap_business = PFSAIssetControl('setup42_searchpagemap_business','','0');
  
              $setup42_searchpagemap_streetViewControl = PFSAIssetControl('setup42_searchpagemap_streetViewControl','','1');
  
              $setup42_searchpagemap_style = preg_replace('/\s+/', '',PFSAIssetControl('setup42_searchpagemap_style','',''));
  
              if (mb_substr($setup42_searchpagemap_style, 0, 1,'UTF-8') == '[' &amp;&amp; mb_substr($setup42_searchpagemap_style, -1, 1,'UTF-8') == ']') {
  
                  $setup42_searchpagemap_style = mb_substr($setup42_searchpagemap_style, 1, -1,'UTF-8');
  
              }
  
              $setup42_searchpagemap_style = base64_encode( strip_tags( $setup42_searchpagemap_style ));
  
              $setup42_searchpagemap_height = str_replace('px', '', $setup42_searchpagemap_height);
  
              $setup42_mheight = str_replace('px', '', $setup42_mheight);
  
              $setup42_theight = str_replace('px', '', $setup42_theight);
  
              $setup7_geolocation_status = 0;
  
  
  
  
  
              /* Build Map */
  
  
  
              $pfg_paged = 1;
  
  
  
              if ( is_front_page() ) {
  
                  $pfg_paged = (esc_sql(get_query_var('page'))) ? esc_sql(get_query_var('page')) : 1;   
  
              } else {
  
                  $pfg_paged = (esc_sql(get_query_var('paged'))) ? esc_sql(get_query_var('paged')) : 1; 
  
              }
  
  
  
              /*Get if sort/order/number values exist*/
  
              if(isset($_GET['pfsearch-filter']) &amp;&amp; $_GET['pfsearch-filter']!=''){$pfg_orderby = esc_attr($_GET['pfsearch-filter']);}else{$pfg_orderby = $setup22_searchresults_defaultsortbytype;}
  
              if(isset($_GET['pfsearch-filter-order']) &amp;&amp; $_GET['pfsearch-filter-order']!=''){$pfg_order = esc_attr($_GET['pfsearch-filter-order']);}else{$pfg_order = $setup22_searchresults_defaultsorttype;}
  
              if(isset($_GET['pfsearch-filter-number']) &amp;&amp; $_GET['pfsearch-filter-number']!=''){$pfg_number = esc_attr($_GET['pfsearch-filter-number']);}else{$pfg_number = "-1";}
  
  
  
              echo do_shortcode('[pf_directory_map setup5_mapsettings_height="'.$setup42_searchpagemap_height.'" setup42_mheight="'.$setup42_mheight.'" setup42_theight="'.$setup42_theight.'" setup5_mapsettings_zoom="'.$setup42_searchpagemap_zoom.'" setup5_mapsettings_zoom_mobile="'.$setup42_searchpagemap_mobile.'" setup8_pointsettings_ajax="0" setup5_mapsettings_autofit="1" setup5_mapsettings_autofitsearch="0" setup5_mapsettings_type="'.$setup42_searchpagemap_type.'" setup5_mapsettings_business="'.$setup42_searchpagemap_business.'" setup5_mapsettings_streetViewControl="'.$setup42_searchpagemap_streetViewControl.'" mapsearch_status="0" mapnot_status="0" setup5_mapsettings_lat="'.$setup42_searchpagemap_lat.'" setup5_mapsettings_lng="'.$setup42_searchpagemap_lng.'" setup5_mapsettings_style="'.$setup42_searchpagemap_style.'" setup7_geolocation_status="0" listingtype="'.$pf_mapheader_arr['pointfinderltypes'].'" itemtype="'.$pf_mapheader_arr['pointfinderitypes'].'" conditions="'.$pf_mapheader_arr['pointfinderconditions'].'" features ="'.$pf_mapheader_arr['pointfinderfeatures'].'" locationtype="'.$pf_mapheader_arr['pointfinderlocations'].'" ppp="'.$pfg_number.'" paged="'.$pfg_paged.'" orderby="'.$pfg_orderby.'" order="'.$pfg_order.'"]');
  
  
  
          }
  
  
  
  
  
          $setup42_authorpagedetails_grid_layout_mode = PFSAIssetControl('setup22_searchresults_grid_layout_mode','','1');
  
          $setup42_authorpagedetails_defaultppptype = $setup22_searchresults_defaultppptype;
  
  
  
          $setup22_searchresults_defaultlistingtype = PFSAIssetControl('setup22_dlcfc','','3');
  
  
  
          $setup42_authorpagedetails_grid_layout_mode = ($setup42_authorpagedetails_grid_layout_mode == 1) ? 'fitRows' : 'masonry' ;
  
          $setup22_searchresults_background2 = PFSAIssetControl('setup22_searchresults_background2','','#ffffff');
  
          $setup22_searchresults_status_catfilters = PFSAIssetControl('setup22_searchresults_status_catfilters','','1');
  
          $stp22_infscrl_c = PFSAIssetControl('stp22_infscrl_c','',0);
  
          $stp22_infscrl_c2 = PFSAIssetControl('stp22_infscrl_c2','',0);
  
  
  
          if ($setup22_searchresults_status_catfilters == 1) {
  
              $filters_text = 'true';
  
          }else{
  
              $filters_text = 'false';
  
          }
  
  
  
          if($general_ct_page_layout == 1 || $general_ct_page_layout == 2){
  
              if ($general_ct_page_layout == 2) {
  
                  $topmap_status = "1";
  
              }else{
  
                  $topmap_status = "0";
  
              }
  
              $setup_item_catpage_sidebarpos = PFASSIssetControl('setup_item_catpage_sidebarpos','','2');
  
              echo '&lt;section role="main"&gt;';
  
              if ($general_ct_page_layout == 2) {
  
                  echo '&lt;div class="pf-fullwidth pf-itempage-br-xm pf-itempage-br-xm-nh"&gt;&lt;div class="pf-container"&gt;&lt;div class="pf-row"&gt;&lt;div class="col-lg-12"&gt;';
  
                              $br_output = pf_the_breadcrumb(array('taxname' =&gt; $get_term_nameforlink));
  
                  echo '&lt;div class="pf-breadcrumbs pf-breadcrumbs-special"&gt;'.$br_output.'&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;';
  
              }
  
                  echo '&lt;div class="pf-page-spacing"&gt;&lt;/div&gt;';
  
                  echo '&lt;div class="pf-container"&gt;&lt;div class="pf-row clearfix"&gt;';
  
                      if ($setup_item_catpage_sidebarpos == 3) {
  
                          echo '&lt;div class="col-lg-12"&gt;&lt;div class="pf-page-container"&gt;';
  
                              echo do_shortcode('[pf_itemgrid2 orderby="'.$setup22_searchresults_defaultsortbytype.'" sortby="'.$setup22_searchresults_defaultsorttype.'" items="'.$setup42_authorpagedetails_defaultppptype.'" cols="'.$setup22_searchresults_defaultlistingtype.'" grid_layout_mode="'.$setup42_authorpagedetails_grid_layout_mode.'" filters="'.$filters_text.'" itemboxbg="'.$setup22_searchresults_background2.'" infinite_scroll="'.$stp22_infscrl_c.'" infinite_scroll_lm="'.$stp22_infscrl_c2.'" termname="'.$get_termname.'" topmap="'.$topmap_status.'" '.$filter_text.']' );
  
                          echo '&lt;/div&gt;&lt;/div&gt;';
  
                      }else{
  
                          if($setup_item_catpage_sidebarpos == 1){
  
                              echo '&lt;div class="col-lg-3 col-md-4"&gt;';
  
                                  get_sidebar('itemcats' ); 
  
                              echo '&lt;/div&gt;';
  
                          }
  
  
  
                          echo '&lt;div class="col-lg-9 col-md-8"&gt;&lt;div class="pf-page-container"&gt;'; 
  
  
  
                          echo do_shortcode('[pf_itemgrid2 orderby="'.$setup22_searchresults_defaultsortbytype.'" sortby="'.$setup22_searchresults_defaultsorttype.'" items="'.$setup42_authorpagedetails_defaultppptype.'" cols="'.$setup22_searchresults_defaultlistingtype.'" grid_layout_mode="'.$setup42_authorpagedetails_grid_layout_mode.'" filters="'.$filters_text.'" itemboxbg="'.$setup22_searchresults_background2.'" infinite_scroll="'.$stp22_infscrl_c.'" infinite_scroll_lm="'.$stp22_infscrl_c2.'" termname="'.$get_termname.'" topmap="'.$topmap_status.'" '.$filter_text.']' );
  
  
  
                          echo '&lt;/div&gt;&lt;/div&gt;';
  
                          if($setup_item_catpage_sidebarpos == 2){
  
                              echo '&lt;div class="col-lg-3 col-md-4"&gt;';
  
                                  get_sidebar('itemcats' );
  
                              echo '&lt;/div&gt;';
  
                          }
  
                      }
  
  
  
                  echo '&lt;/div&gt;&lt;/div&gt;';
  
                  echo '&lt;div class="pf-page-spacing"&gt;&lt;/div&gt;';
  
              echo '&lt;/section&gt;';
  
          }elseif ($general_ct_page_layout == 3) {
  
  
  
  
  
              /* Get Variables and apply */
  
  
  
  
  
              $setup42_searchpagemap_lat = PFSAIssetControl('setup42_searchpagemap_lat','','');
  
              $setup42_searchpagemap_lng = PFSAIssetControl('setup42_searchpagemap_lng','','');
  
              $setup42_searchpagemap_zoom = PFSAIssetControl('setup42_searchpagemap_zoom','','12');
  
              $setup42_searchpagemap_mobile = PFSAIssetControl('setup42_searchpagemap_mobile','','10');
  
              $setup42_searchpagemap_type = PFSAIssetControl('setup42_searchpagemap_type','','ROADMAP');
  
              $setup42_searchpagemap_business = PFSAIssetControl('setup42_searchpagemap_business','','0');
  
              $setup42_searchpagemap_streetViewControl = PFSAIssetControl('setup42_searchpagemap_streetViewControl','','1');
  
              $setup42_searchpagemap_style = preg_replace('/\s+/', '',PFSAIssetControl('setup42_searchpagemap_style','',''));
  
              if (mb_substr($setup42_searchpagemap_style, 0, 1,'UTF-8') == '[' &amp;&amp; mb_substr($setup42_searchpagemap_style, -1, 1,'UTF-8') == ']') {
  
                  $setup42_searchpagemap_style = mb_substr($setup42_searchpagemap_style, 1, -1,'UTF-8');
  
              }
  
              $setup42_searchpagemap_style = base64_encode( strip_tags( $setup42_searchpagemap_style ));
  
              $setup7_geolocation_status = 0;
  
  
  
  
  
              /* Build Map */
  
  
  
              /*Get if sort/order/number values exist*/
  
              if(isset($_GET['pfsearch-filter']) &amp;&amp; $_GET['pfsearch-filter']!=''){$pfg_orderby = esc_attr($_GET['pfsearch-filter']);}else{$pfg_orderby = $setup22_searchresults_defaultsortbytype;}
  
              if(isset($_GET['pfsearch-filter-order']) &amp;&amp; $_GET['pfsearch-filter-order']!=''){$pfg_order = esc_attr($_GET['pfsearch-filter-order']);}else{$pfg_order = $setup22_searchresults_defaultsorttype;}
  
              if(isset($_GET['pfsearch-filter-number']) &amp;&amp; $_GET['pfsearch-filter-number']!=''){$pfg_number = esc_attr($_GET['pfsearch-filter-number']);}else{$pfg_number = "-1";}
  
  
  
              echo do_shortcode('[pf_directory_half_map orderby="'.$setup22_searchresults_defaultsortbytype.'" sortby="'.$setup22_searchresults_defaultsorttype.'" setup5_mapsettings_zoom="'.$setup42_searchpagemap_zoom.'" setup5_mapsettings_zoom_mobile="'.$setup42_searchpagemap_mobile.'" setup5_mapsettings_autofit="1" setup5_mapsettings_autofitsearch="1" setup5_mapsettings_type="'.$setup42_searchpagemap_type.'" setup5_mapsettings_business="'.$setup42_searchpagemap_business.'" setup5_mapsettings_streetViewControl="'.$setup42_searchpagemap_streetViewControl.'" mapsearch_status="1" mapnot_status="1" setup5_mapsettings_lat="'.$setup42_searchpagemap_lat.'" setup5_mapsettings_lng="'.$setup42_searchpagemap_lng.'" setup5_mapsettings_style="'.$setup42_searchpagemap_style.'" setup7_geolocation_status="0" listingtype="'.$pf_mapheader_arr['pointfinderltypes'].'" itemtype="'.$pf_mapheader_arr['pointfinderitypes'].'" conditions="'.$pf_mapheader_arr['pointfinderconditions'].'" features ="'.$pf_mapheader_arr['pointfinderfeatures'].'" locationtype="'.$pf_mapheader_arr['pointfinderlocations'].'"  termname="'.$get_termname.'" csauto="'.$term_name['term_id'].'"]');
  
  
  
          }
  
  
  
      }
  
  
  
  
  
  get_footer();
  
  ?&gt;
  </code></pre>
  
  <p>On my research i have found that something like this should work:</p>
  
  <pre><code>&lt;?php
  function new_excerpt_more($more) {
      global $post;
      return '... &lt;a href="'. get_permalink($post-&gt;ID) . '"&gt;continue reading&lt;/a&gt;.';
  }
  add_filter('excerpt_more', 'new_excerpt_more');
  ?&gt;
  </code></pre>
  
  <p>But i'm not sure where to put this to make it work.</p>
  
  <p>Thank you in advance for the help. I really appreciate it. </p>