Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent menu slug does not work in $config #672

Closed
rinkuyadav999 opened this issue Jun 26, 2017 · 4 comments
Closed

Parent menu slug does not work in $config #672

rinkuyadav999 opened this issue Jun 26, 2017 · 4 comments

Comments

@rinkuyadav999
Copy link

rinkuyadav999 commented Jun 26, 2017

Hi

I have downloaded class-tgm-plugin-activation for theme and it adds link under themes.php perfectly using config:

$config = array( 'id' => 'mytheme', 'default_path' => '', 'menu' => 'mytheme-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', );

But i want to display link under plugins.php instead themes.php so i added
'parent_slug' => 'plugins.php',
'capability' => 'manage_options'
But it keeps link under themes.php. Expecting sub menu of plugins.php

@jrfnl
Copy link
Contributor

jrfnl commented Jun 26, 2017

Hi @rinkuyadav999, to help you I need a little more information. Could you answer the following questions ?

  • Did you download the zip from this repo or did you use the Custom TGMPA Generator on the website ?
  • If the Custom TGMPA Generator: which choices did you make in the form ?
  • From your message I gather you are including TGMPA in a theme, nor a plugin. Is that correct ?

@rinkuyadav999
Copy link
Author

Hi @jrfnl

  • I used Custom TGMPA Generator on the website.
  • I chosen theme because i want to use it in theme.
  • Yes i am using in theme.

Everything works fine, just i want to display link of 'install plugin' under plugins.php instead themes.php

@jrfnl
Copy link
Contributor

jrfnl commented Jun 27, 2017

Hi @rinkuyadav999,

Did you choose "WordPress.org" or "ThemeForest" as the publication channel for the theme when you downloaded ? If so, that's the reason.

The theme review rules for themes which are to be published in the WP theme repository (same goes for ThemeForest) do not allow for themes to add an admin page anywhere but under the "Themes" menu, so that functionality gets disabled for the WP version generated by the Custom TGMPA Generator.
If you don't intend to publish the theme in the WP theme repository or via ThemeForest, just choose "other publication channel" in the form and you'll receive a full featured version of TGMPA ;-)

For more information about the different versions generated by the Custom TGMPA Generator, see #519.

Does that solve your issue ?

@rinkuyadav999
Copy link
Author

Yes it is TRT cap :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants