Title: Undefined variable: $p
Last modified: August 21, 2016

---

# Undefined variable: $p

 *  [Chris Van Patten](https://wordpress.org/support/users/chrisvanpatten/)
 * (@chrisvanpatten)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/undefined-variable-p/)
 * Hi there –
 * I’m using Efficient Related Posts in a client project, and on a certain post 
   I’m seeing this error:
 * `Notice: Undefined variable: p in /home/path/to/content/plugins/efficient-related-
   posts/efficient-related-posts.php on line 318`
 * (I replaced the actual path with `/path/to/`, fyi.)
 * The particular post doesn’t have any related posts, which would seem to be why
   $p isn’t defined.
 * At first, I thought the error was being triggered because I’m filtering `erp-
   related-link` and `erp-related-links-output` to rewrite the markup, but even 
   after removing the filters the error persists.
 * The error doesn’t seem to be a big deal—it’s not breaking anything or halting
   execution—but is it possible to get rid of the error without changing my error
   reporting level? It’s just ugly 🙂
 * [http://wordpress.org/plugins/efficient-related-posts/](http://wordpress.org/plugins/efficient-related-posts/)

The topic ‘Undefined variable: $p’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/efficient-related-posts.svg)
 * [Efficient Related Posts](https://wordpress.org/plugins/efficient-related-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/efficient-related-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/efficient-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/efficient-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/efficient-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/efficient-related-posts/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)

 * 0 replies
 * 1 participant
 * Last reply from: [Chris Van Patten](https://wordpress.org/support/users/chrisvanpatten/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/undefined-variable-p/)
 * Status: not resolved