Title: Custom Post Type Error
Last modified: November 3, 2019

---

# Custom Post Type Error

 *  [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * (@wpuser_robin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/)
 * Hello,
 * I created a custom post type some time ago. Recently, when I request to display
   a specific category (associate, residential, commercial) the page returns:
 * >  Error thrown
   >  Call to a member function is_singular() on integer
 * What is my error and how can I fix it?
 * Thank you for reading my post!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-post-type-error-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092151)
 * How did you create the CPT — and how are you displaying it?
 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092309)
 * Where does this error show up and what does that block of code look like?
 * If it’s in a theme and you’re unsure of theme development you may have to contact
   the theme author.
 * If it’s in a plugin you will have to contact the plugin authors.
 *  Thread Starter [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * (@wpuser_robin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092628)
 * > How did you create the CPT — and how are you displaying it?
 * [@kgagne](https://wordpress.org/support/users/kgagne/)
 * Thank you for your response!
 * First, I need to apologize. I stated I created the CPT. I did not. A WordPress
   developer did. I have a ping to him for additional information. (I attempted 
   to correct my post but found no option where I could.)
 * Second, I am unsure on how to respond to your second question. It is being displayed
   at the link I provided. If this does not answer your question, please let me 
   know.
 * Thanks again!
 *  Thread Starter [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * (@wpuser_robin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092640)
 * > Where does this error show up and what does that block of code look like?
   > If it’s in a theme and you’re unsure of theme development you may have to contact
   > the theme author.
   > If it’s in a plugin you will have to contact the plugin authors.
 * [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/)
 * Thank you for your response!
 * The error appears when you request to display one of the three categories at 
   the top of the paged I linked in my original post. The error code appears on 
   the page that is suppose to display the one category. Does this answer your question?
 * I do not believe the error is part of the theme because the theme was installed
   sometime before the CPT was created and theme does not offer the ability to create
   a CPT.
 * And I do not believe the error is due to a plugin because if it was, there is
   not plugin installed that gives the ability to create CPTs.
 * FYI, I have a ping into the person who created the CPT for additional information.
 * Thanks again!
 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092642)
 * I see it now when clicking a category. This will surely require developer intervention
   and not something that is easily fixable from a user standpoint. Whenever the
   developer enables debugging it should let them know where exactly the issue lies(
   what PHP file and what line ).
 * One thing you may want to try is head to WordPress Admin -> Settings -> Permalinks-
   > and simply click the blue save button. This will refresh the permalink, likely
   won’t solve the issue but worth a shot.
 *  Thread Starter [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * (@wpuser_robin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092657)
 * > I see it now when clicking a category. This will surely require developer intervention
   > and not something that is easily fixable from a user standpoint. Whenever the
   > developer enables debugging it should let them know where exactly the issue
   > lies ( what PHP file and what line ).
   > One thing you may want to try is head to WordPress Admin -> Settings -> Permalinks-
   > > and simply click the blue save button. This will refresh the permalink, likely
   > won’t solve the issue but worth a shot.
 * [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/)
 * Thank you for your quick response.
 * I believed I identified the PHP file where the error code is originating. Do 
   you know how I can identify which line of code where the error resides?
 * FYI, I tried refreshing the permalink and no change.
 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092667)
 * If you’re not familiar with PHP I wouldn’t suggest messing with the files. If
   you find you need to make a child theme and you do not, your changes will be 
   overridden whenever the theme updates.
 * That being said… If you enable [WordPress Debugging](https://wordpress.org/support/article/debugging-in-wordpress/)(
   especially `WP_DEBUG_LOG` and check `wp-content/debug.log` ) then that error 
   may tell you specifically what file and line the issue originates.
 * An easier solution may be to contact a local developer at a [local meetup](https://www.meetup.com/topics/wordpress/)
   or [local WordCamp](https://central.wordcamp.org/schedule/), possibly your host
   and see if they can fix this issue.
 *  Thread Starter [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * (@wpuser_robin)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092673)
 * > If you’re not familiar with PHP I wouldn’t suggest messing with the files. 
   > If you find you need to make a child theme and you do not, your changes will
   > be overridden whenever the theme updates.
   > That being said… If you enable WordPress Debugging ( especially WP_DEBUG_LOG
   > and check wp-content/debug.log ) then that error may tell you specifically 
   > what file and line the issue originates.
   > An easier solution may be to contact a local developer at a local meetup or
   > local WordCamp, possibly your host and see if they can fix this issue.
 * [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/)
 * Thank you! Your information was very helpful.
 * Have a great weekend!

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

The topic ‘Custom Post Type Error’ is closed to new replies.

## Tags

 * [cpt](https://wordpress.org/support/topic-tag/cpt/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [WPuser_Robin](https://wordpress.org/support/users/wpuser_robin/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-error-8/#post-12092673)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
