Title: TGM plugin activation
Last modified: August 30, 2016

---

# TGM plugin activation

 *  Resolved [Niki Bilejn](https://wordpress.org/support/users/niki-bilejn/)
 * (@niki-bilejn)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/)
 * After I add TGM plugin files to my theme I getting this error:
 * REQUIRED: class-tgm-plugin-activation.php. Themes should use add_theme_page()
   for adding admin pages.
 * Line 641: $this->page_hook = call_user_func( ‘add_submenu_page’, $args[‘parent_slug’],
   $args[‘page_title’], $args[‘menu_t
 * Is there any example how to fix this. Think that theme will not pass review with
   this error.
 * Best Regards
 * [https://wordpress.org/plugins/theme-check/](https://wordpress.org/plugins/theme-check/)

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

 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/#post-6733511)
 * Hi Medians,
 * All you need to do is remove line 638-642 while leaving line 639 in place.
 * [https://github.com/TGMPA/TGM-Plugin-Activation/blob/2.5.2/class-tgm-plugin-activation.php#L638-L642](https://github.com/TGMPA/TGM-Plugin-Activation/blob/2.5.2/class-tgm-plugin-activation.php#L638-L642)
 * Hope this helps!
 * Smile,
    Juliette
 * [Edited for correct line numbers of latest release]
 *  Plugin Author [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [10 years, 7 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/#post-6733578)
 * Use this fork:
    [https://github.com/Otto42/TGM-Plugin-Activation](https://github.com/Otto42/TGM-Plugin-Activation)
 *  Thread Starter [Niki Bilejn](https://wordpress.org/support/users/niki-bilejn/)
 * (@niki-bilejn)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/#post-6733591)
 * Thank you sooo much both of you. It works perfect! :)))))
 *  [Manohar](https://wordpress.org/support/users/cwmanohar/)
 * (@cwmanohar)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/#post-8186314)
 * Thanks a lot [@samuel](https://wordpress.org/support/users/samuel/). it works
   perfect for me
    -  This reply was modified 9 years, 9 months ago by [Manohar](https://wordpress.org/support/users/cwmanohar/).

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

The topic ‘TGM plugin activation’ is closed to new replies.

 * ![](https://ps.w.org/theme-check/assets/icon-128x128.png?rev=972579)
 * [Theme Check](https://wordpress.org/plugins/theme-check/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-check/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-check/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-check/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-check/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-check/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Manohar](https://wordpress.org/support/users/cwmanohar/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/tgm-plugin-activation-1/#post-8186314)
 * Status: resolved