Increasing the number of themes displayed in Appearance -> Themes
WPMU DEV Community
Increasing the number of themes displayed in Appearance -> Themes
Elite
578 pointsLike some sort of WPMU DEV God"Exceptionally helpful
Saunt Valerian
Member
—
30th April 2011 (1 year ago)
Is there any bit of code, or snippet or hack that could be used to increase the number of theme thumbnails that are displayed in the dashboard on Appearance->Theme?
I'm running a multisite and have about 300 themes available - but only 15 themes are displayed giving users almost 20 pages to browse through. That's a lot of pages, I think the large number of options is good, but it seems like users aren't getting to some of the beauties that in are in there after page 10.
There must be something in the code that can be changed to increase to 30 or 40 themes per page.
I'm pretty sure that it'll really slow down the page load, so it has to be tested out a little, but I just want to know where to change it.
Is there any bit of code, or snippet or hack that could be used to increase the number of theme thumbnails that are displayed in the dashboard on Appearance->Theme?
I'm running a multisite and have about 300 themes available - but only 15 themes are displayed giving users almost 20 pages to browse through. That's a lot of pages, I think the large number of options is good, but it seems like users aren't getting to some of the beauties that in are in there after page 10.
There must be something in the code that can be changed to increase to 30 or 40 themes per page.
I'm pretty sure that it'll really slow down the page load, so it has to be tested out a little, but I just want to know where to change it.
To elaborate on what @Ovidiu said about the Rollover Themes List plugin:
The problem is that the plugin changes the Appearance menu structure so that Widgets is the top item. This can also cause issues with some plugins. For example, we use Quick Cache largely because it automatically clears a sub-site's cache when the user changes themes. But, the menu alteration in Rollover Themes List breaks this functionality.
The fix is a one-two punch:
1) Modify Rollover Themes List so that it does not suppress the original Themes page and alter the menu. To do this, look for this line in the plugin:
Unfortunately, this leaves you with two Themes menu items...the original one and the special Themes page created by the plugin. You'll fix this in step 2.
interesting. I just lived with that shortcoming, never thought about correcting it. do you think it is fixable without an extra plugin? I am refering to 2)
removing the original menu would work with this line, right?
function remove_submenus() {
global $submenu;
unset($submenu['themes.php'][5]); // Removes 'Themes'.
}
add_action('admin_menu', 'remove_submenus');
any idea how to move the other one up with code, no plugins involved?
Hmm, your code should remove the menu. I'm not sure how to move the other one up, though I think it's covered in the codex.
The reason I avoided this kind of recoding is that the Rollover Themes List plugin does a lot with the Appearance menu, for example making Widgets the parent item...although item 1 in my recommendation eliminates that issue. But I was still afraid that there might be many other things under the hood that I didn't want to touch.
In retrospect, I think you are right though.
I know it's better to avoid using an external plugin, but if we can't find an alternative, Admin Menu Editor does seem to be pretty clean and trouble free.
I'll look into the menu location tonight. Please let me know if you figure it out first. :-)
nope, no time yet, got an exam coming up and this is way over my coding skills. will do some googling though and let you know if I find anything useful...
@wpcdn: jsut realized that the supporter-themes link: mydomain/wp-admin/themes.php?page=premium-themes doesn't work anymore with the rollover-themes list active as the themes page gets redirected...
Responses (8)
Member — 30th April 2011 (1 year ago) #
I can't help you straight away but I am using this plugin as workaround: http://wordpress.org/extend/plugins/rollover-themes-list/
the only drawback I see is that it puts the widgets instead of themes as top level menu ...
check it out :-)
Lifetime member! — 30th April 2011 (1 year ago) #
To elaborate on what @Ovidiu said about the Rollover Themes List plugin:
The problem is that the plugin changes the Appearance menu structure so that Widgets is the top item. This can also cause issues with some plugins. For example, we use Quick Cache largely because it automatically clears a sub-site's cache when the user changes themes. But, the menu alteration in Rollover Themes List breaks this functionality.
The fix is a one-two punch:
1) Modify Rollover Themes List so that it does not suppress the original Themes page and alter the menu. To do this, look for this line in the plugin:
define( 'DS_THEMES_DISABLE_ORIGINAL_MENU', 'TRUE' );Change
TRUEtoFALSE.Unfortunately, this leaves you with two Themes menu items...the original one and the special Themes page created by the plugin. You'll fix this in step 2.
2) Install the Admin Menu Editor plugin.
http://wordpress.org/extend/plugins/admin-menu-editor/
Use it to suppress the original Themes menu item and to move the plugin's Themes menu item to the top of the Appearance menu.
So, under the hood, everything works fine. And the Admin Menu Editor plugin makes everything look normal.
HTH,
Mark
Sales & Support Lead — 30th April 2011 (1 year ago) #
+1 for dSader's rollover theme list plugin. I use it as well :)
Thanks to everyone for commenting!
Member — 1st May 2011 (1 year ago) #
@wpcdn:
interesting. I just lived with that shortcoming, never thought about correcting it. do you think it is fixable without an extra plugin? I am refering to 2)
removing the original menu would work with this line, right?
any idea how to move the other one up with code, no plugins involved?
Lifetime member! — 1st May 2011 (1 year ago) #
Hi,
Hmm, your code should remove the menu. I'm not sure how to move the other one up, though I think it's covered in the codex.
The reason I avoided this kind of recoding is that the Rollover Themes List plugin does a lot with the Appearance menu, for example making Widgets the parent item...although item 1 in my recommendation eliminates that issue. But I was still afraid that there might be many other things under the hood that I didn't want to touch.
In retrospect, I think you are right though.
I know it's better to avoid using an external plugin, but if we can't find an alternative, Admin Menu Editor does seem to be pretty clean and trouble free.
I'll look into the menu location tonight. Please let me know if you figure it out first. :-)
Thanks,
Mark
Member — 2nd May 2011 (1 year ago) #
nope, no time yet, got an exam coming up and this is way over my coding skills. will do some googling though and let you know if I find anything useful...
Member — 8th May 2011 (1 year ago) #
@wpcdn: jsut realized that the supporter-themes link: mydomain/wp-admin/themes.php?page=premium-themes doesn't work anymore with the rollover-themes list active as the themes page gets redirected...
Member — 16th May 2011 (1 year ago) #
@wpcdn: are you still looking at this? I admit tis way over my head ;-)
Become a member