Title: Undefined variable: description
Last modified: August 21, 2016

---

# Undefined variable: description

 *  Resolved [Dewey Bushaw](https://wordpress.org/support/users/styledev/)
 * (@styledev)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-description/)
 * In file: aioseop_class.php
    Error: Notice: Undefined variable: description in/
   Users/…/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php on line 1027
 * Line: 1027: $description = apply_filters( ‘aioseop_description’, $description);
 * Change to the following to fix:
 * if ( isset($description) ) $description = apply_filters( ‘aioseop_description’,
   $description );
 * Seen when accessing WooCommerce /shop page.
 * [http://wordpress.org/extend/plugins/all-in-one-seo-pack/](http://wordpress.org/extend/plugins/all-in-one-seo-pack/)

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

 *  [ckpicker](https://wordpress.org/support/users/ckpicker/)
 * (@ckpicker)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793804)
 * Awesome! Was just looking for this. Thanks!
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793805)
 * What I would suggest doing, and what will be the fix in the next version, is 
   to set $description to the empty string much earlier in the wp_head() function
   there; that’d look like this:
 * `$description = '';`
 * The issue with your fix is, it prevents the aioseop_description filter from running
   when there isn’t a description present.
 *  Thread Starter [Dewey Bushaw](https://wordpress.org/support/users/styledev/)
 * (@styledev)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793806)
 * Thanks for weighing in on this!
 *  [Michael Soriano](https://wordpress.org/support/users/mks6804/)
 * (@mks6804)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793825)
 * I’m getting the same warning. but it only happens in my custom post type archive
   pages.
 * adding $description = ”; right above wp_head() didn’t work. any ideas?
 *  [Michael Soriano](https://wordpress.org/support/users/mks6804/)
 * (@mks6804)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793826)
 * i misunderstood. I added $description = ”; in header.php – right above wp_head().
 * adding it in all-in-one-seo-pack\aioseop_class.php wp_head() did the trick. per
   [@peter](https://wordpress.org/support/users/peter/) Baylies – the fix will be
   in the next plugin release i hope.
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793827)
 * michael,
 * Glad you fixed it! Yes, as I said, this fix will be in the next release.
 *  [brynte](https://wordpress.org/support/users/brynte/)
 * (@brynte)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793836)
 * There seems to have been several updates since this issue was resolved, still
   I get the same error.
 * My message reads:
    Notice: Undefined variable: author in /storage/content/85/
   106985/bryntemedia.se/public_html/wp-content/plugins/all-in-one-seo-pack/aioseop_class.
   php on line 1378

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

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

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

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

 * 7 replies
 * 5 participants
 * Last reply from: [brynte](https://wordpress.org/support/users/brynte/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-description/#post-3793836)
 * Status: resolved