Title: Usage of strpos PHP function incorrect
Last modified: September 1, 2017

---

# Usage of strpos PHP function incorrect

 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years, 9 months ago](https://wordpress.org/support/topic/usage-of-strpos-php-function-incorrect/)
 * Less support question, and more informational to help improve the plugin.
 * In the set_args() method for the ICPagePosts class, you have the needle/haystack
   order incorrect for `strpos` calls.
 * As is, you have `if ( strpos( ',', $this->args['post_type'] ) ) {` when it should
   be `if ( strpos( $this->args['post_type'], ',' ) ) {` This is true for the other
   strpos call in the exclude_category check as well.

The topic ‘Usage of strpos PHP function incorrect’ is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/usage-of-strpos-php-function-incorrect/)
 * Status: not a support question