Categories:> WordPress

How to limit WordPress gallery thumbnails in the loop

Today I stumbled upon a problem, which I think it should be common sense to have in WordPress. I wanted to list the default WordPress image galleries from posts in the loop, but I couldn’t find any shortcode to limit the displayed number of thumbnails. After spending 2 hours on research I’ve found some solutions to this problem, but I had to dig in to the functions.php of my theme.

The solution is to modify the GALLERY shortcode with filters from your functions.php file and then define in a variable how many thumbnails you want in the loop, which will be interpreted by a function.

More "How to limit WordPress gallery thumbnails in the loop"
Categories:> WordPress

WordPress Admin Dashboard Hacks – Removing stuff

We were developing a custom subscription management plugin for Kamikaze (a cool magazine in Romania) where the subscribed users had to be redirected to the WordPress Dashboard after logging in.

WordPress by default has some small “widgets” that are intended for a tech savvy blogger or for an administrator, not for a basic internet user who barely knows how to check his e-mail. This is why we had to remove these so called widgets from the dashboard, but only for the users and not for the administrators.

More "WordPress Admin Dashboard Hacks – Removing stuff"