How to add a help tab to all admin pages – including plugin pages

I have working code which adds a help tab to all screens in the admin which already have help options or a help screen – however, screens which don’t have contextual help – such as the plugin I writing, also don’t recognize the add_action call – how can I ensure that the help_tab appears on each and every screen in the admin? Some simple code – but it’s more or less exactly like in the Codex. I add the action in the class __construct // add help tab to admin…

AJAX with loop filtering categories

I’ve been researching on how to make my loop with AJAX. I found some codes online and modified some parts but I can’t seem to get it to work. This is my code for the loop: <article id= »main » class= »five seventh padded »> <?php $categories = get_categories(); ?> <ul id= »category-menu »> <?php foreach ( $categories as $cat ) { ?> <li id= »cat-<?php echo $cat->term_id; ?> »><a class= »<?php echo $cat->slug; ?> ajax » onclick= »cat_ajax_get(‘<?php echo $cat->term_id; ?>’); » href= »# »><?php echo $cat->name; ?></a></li> <?php } ?> </ul> <div id= »loading-animation » style= »display: none; »><img src= »<?php echo admin_url ( ‘images/loading-publish.gif’ ); ?> »/></div>…

Web Design Weekly #116

Headlines What Screens Want Frank Chimero has taken his recent talk one step further and wrapped it up into a beautiful essay. (frankchimero.com) Responsive Design Won’t Fix Your Content Problem Responsive design itself won’t fix your content—no one ever said it would. But the opportunity to implement a responsive redesign is also the opportunity to fix your content and its underlying strategy. (alistapart.com) Teamwork for Pros The only collaboration tool designed by web developers for web developers. Integrable with Springloops SVN/Git Source & Deploy and 100% FREE up to 10…

Session alternative for plugins (due to caching)

I’m building a plugin that picks a random post from the database and delivers the result dynamically to the user. For certain aspects I need to know the post ID that’s been randomly selected. Session data would work perfectly for this if it weren’t for website caching. When a site is cached, the post that is supposed to load dynamically, based on the session data, doesn’t load anything. What alternatives do I have to using $_SESSION? Source: https://wordpress.stackexchange.com/feeds

Web Design Weekly #115

Headlines Mobile usability problems Erin Kissane touches briefly on a short list of mobile usability problems that she has noticed again and again by some big organisations. She touches on the point that mobile use is only growing and these problems can’t be ignored for too much longer. Great post! (the-pastry-box-project.net) Sass For Web Designers (simplebits.com) Melany Lane Script Font (full family) – only $17! Melany Lane is a hand-drawn script typeface that is just overflowing with fun, flourish and quirkiness. It’s almost impossible to look at Melany Lane without…

Collection of fields in a single post

It’s possible to create custom post types and custom fields but, is it possible to create custom field collections? That is, groups of different fields as an entity (a dropdown, two images and a textfield)? https://drupal.org/project/field_collection In Drupal there’s something like this: https://drupal.org/project/field_collection Screenshot: http://www.commonplaces.com/sites/commonplaces.com/files/images/blog/example-field-collection.png And I was wondering what’s the closest thing in WP. Source: https://wordpress.stackexchange.com/feeds

Seeting Active Nav for Bootstrap in WordPress

OK , I have a Custom Theme generated by Bootstrap. Currently I just added a Navbar (navigation to the theme and I am having trouble on setting ACTIVE navbar in each active page.(by adding active class to the li) For example if I am in Contact us page how I can force the navbar to make the contact us nav active! I alreadt tried <li <?php is_page( ‘Home’ ){echo ‘class= »active »‘}> Home</li> <li <?php is_page( ‘About us’ ){echo ‘class= »active »‘}> About us</li> can you please let me know how I can do…

Exclude subscriber users from user list

I want to exclude Subscribers from a user list. My code is: $users = $wpdb->get_results( « SELECT display_name FROM $wpdb->users ORDER BY display_name ASC » ); How can I change that so subscribers are excluded from the list? I also looked at the get_users function in codex but it did not have an exclude by role parameter.  Edit: Or another way would be to get the results filtered by capability (one that subscribers doesn’t have). Source: https://wordpress.stackexchange.com/feeds

Rename image uploads replacing "width" and "height" in filename with "medium", "large", "small"

Good morning, I am trying to change name format that WordPress uses to rename uploaded files. As I upload an image whose filename is « desert-landscape.jpg », WordPress will set up scaled versions and rename filenames to different combinations of « desert-landscape-{WIDTHxHEIGHT}.jpg » (dipending on thumbnail sizes). Is there a way to remove width & height attribute from filename and replace them by « {medium}-desert-landscape.jpg », « {large}-desert-landscape.jpg » and « {small}-desert-landscape.jpg »? Have been looking at this post Rename image uploads with width in filename me not able to fix it right way. Thank you // The filter runs…

Web Design Weekly #114

Headlines Responsive design, screens, and shearing layers Responsive design might begin with the screen, but it doesn’t end there. In this article Ethan Marcotte touches on some recent articles by high profile individuals and gives his thoughts on where we are heading. Great read! (unstoppablerobotninja.com) Icon fonts, unicode ranges and IE8’s compatibility mode (adactio.com) Teamwork for Pros The only collaboration tool designed by web developers for web developers. Integrable with Springloops SVN/Git Source & Deploy and 100% FREE up to 10 users, it gives you everything you’ll ever need to…