Title: sarscott's Replies | WordPress.org

---

# sarscott

  [  ](https://wordpress.org/support/users/sarscott/)

 *   [Profile](https://wordpress.org/support/users/sarscott/)
 *   [Topics Started](https://wordpress.org/support/users/sarscott/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sarscott/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sarscott/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sarscott/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sarscott/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sarscott/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Cloudflare not retaining settings](https://wordpress.org/support/topic/cloudflare-not-retaining-settings/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/cloudflare-not-retaining-settings/#post-6960873)
 * Hi,
 * thanks for pointing that out. I hadn’t. But it also didn’t help :-/
 * I’ve currently just set my nameservers back and have w3 Total Cache doing the
   minification as I couldn’t get it to work for some reason.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Flush / Rebuild / Refresh RSS Cache](https://wordpress.org/support/topic/flush-rebuild-refresh-rss-cache/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/flush-rebuild-refresh-rss-cache/#post-5798755)
 * Unknowingly, I had 2 versions of my functions.php file open and the one with 
   my changes wasn’t being saved correctly.
 * Every time I adjust the XML feed the RSS is rebuilt automatically.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Get current post taxonomy (category)](https://wordpress.org/support/topic/get-current-post-taxonomy-category/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/get-current-post-taxonomy-category/#post-4938339)
 * I never seem to get a reply on the WordPress forums…
 * I managed to solve it by using this code. Maybe it will help someone else:
 *     ```
       <?php
       	//Get the posts taxonomy details.
       	$taxonomy = 'car_manufacturers';
       	$terms = wp_get_object_terms( $post->ID, $taxonomy, array('orderby'=>'term_order') );
   
       	//If terms has something in it, echo what I need.
       	// 0 = Manufacture
       	// 1 = Model
       	// 2 = Chassis Prefix
       	if ( !empty( $terms ) && !is_wp_error( $terms ) ) {
       		echo $terms[1]->name;
       	}
       ?>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [get_lastpostdate for custom post type](https://wordpress.org/support/topic/get_lastpostdate-for-custom-post-type/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [12 years ago](https://wordpress.org/support/topic/get_lastpostdate-for-custom-post-type/#post-4919185)
 * Well, I got an answer over at Stackoverflow. Look like I have to query the post
   type, get the last post and get it’s modified date. I then wanted to format the
   date so that it read like “15th May”.
 * The code is as follows.
 *     ```
       <p><?php
           $latest = new WP_Query(array('post_type' => 'car', 'post_status' => 'publish', 'posts_per_page' => 1, 'orderby' => 'modified', 'order' => 'ASC'));
           if($latest->have_posts()){
               $modified_date = $latest->posts[0]->post_modified;
           }
           //Get the last post update and display the date as "10th March"
           $lastpost = strtotime($modified_date);
           $lastmonth = date('F', $lastpost);
           $lastday = date('jS', $lastpost);
           echo 'Last Updated '.$lastday.' '.$lastmonth;
           ?>
       </p>
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom post type – Template page not being found](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/#post-4815214)
 * Ok so for anyone reading this…
 * I changed my custom post type from ‘showroom’ to ‘car’ and made the various adjustments(
   single template name etc) all is fine!
 * Only lost about a day of my life 🙂
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom post type – Template page not being found](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/#post-4815212)
 * Upon further investigation this problem is only happening when I set Permalinks
   to “Post name”. If I select “Numeric” for example, the template file is displayed.
 * Does anyone know why that might be?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Custom post type – Template page not being found](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-template-page-not-being-found/#post-4815201)
 * Perhaps I’m doing this wrong.
 * Can someone answer me this…
 * If I want to create a page to display one custom post type and style how that
   post type is displayed e.g grid etc.
 * Do I make a Archive page for that post type and build the structure in there?
   
   OR A Template file for the Page I created in my admin panel?
 * Thanks
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Template file not called using 'Post name' permalink](https://wordpress.org/support/topic/template-file-not-called-using-post-name-permalink/)
 *  Thread Starter [sarscott](https://wordpress.org/support/users/sarscott/)
 * (@sarscott)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/template-file-not-called-using-post-name-permalink/#post-4596776)
 * I can get it to work if I create is archive-showroom.php and copy my template
   file content into it. But still doesn’t explain the odd behaviour in my last 
   post.
 * Any ideas?

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