Title: Bug with custom taxonomy
Last modified: January 10, 2025

---

# Bug with custom taxonomy

 *  [JCV](https://wordpress.org/support/users/psykonevro/)
 * (@psykonevro)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/bug-with-custom-taxonomy/)
 * Hi there,
    Hope to get more lucky with this post. There is little glitch in file
   inc/core/like-dislike-render.php. When using your plugin with a custom taxonomy(
   my own plugin creates it), I get a notice when visiting a page created on the
   fly with the taxonomy:
 * `Warning: Attempt to read property "post_type" on int in wp-content/plugins/posts-
   like-dislike/inc/cores/like-dislike-render.php on line 11`
 * I fixed the bug replacing
 * `if (!in_array($post->post_type, $checked_post_types)) {`
 * by
    `if ( !isset( $post->post_type ) || !in_array($post->post_type, $checked_post_types)){`

The topic ‘Bug with custom taxonomy’ is closed to new replies.

 * ![](https://ps.w.org/posts-like-dislike/assets/icon-256x256.png?rev=2087699)
 * [Posts Like Dislike](https://wordpress.org/plugins/posts-like-dislike/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-like-dislike/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-like-dislike/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-like-dislike/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-like-dislike/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-like-dislike/reviews/)

## Tags

 * [custom taxonomy](https://wordpress.org/support/topic-tag/custom-taxonomy/)
 * [notice](https://wordpress.org/support/topic-tag/notice/)

 * 0 replies
 * 1 participant
 * Last reply from: [JCV](https://wordpress.org/support/users/psykonevro/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/bug-with-custom-taxonomy/)
 * Status: not resolved