Can’t sort custom column on user.php by number / meta_value_num?

Instead of ‘request’ function, use this : add_action(‘pre_user_query’, ‘user_column_orderby’); function user_column_orderby($userquery){ if(‘Votes’==$userquery->query_vars[‘orderby’]) { global $wpdb; $userquery->query_from .= ” LEFT OUTER JOIN $wpdb->usermeta AS alias ON ($wpdb- >users.ID = alias.user_id) “; $userquery->query_where .= ” AND alias.meta_key = ‘wp__user_like_count’ “; $userquery->query_orderby = ” ORDER BY alias.meta_value “.($userquery->query_vars[“order”] == “ASC” ? “asc ” : “desc “); } }

Thumbnails loading forever

I’m thinking the images are hosted on Cloudflare’s CDN? Have you tried using a different browser to see if the issue still persists? Also, if you provide a link, other users could validate if they have the same issue.

Could not find site error

Try this procedure: 1) Go in to Network Admin -> Sites and edit the site you want to BE the new ‘main’ domain so it’s url is http://example.com (remove the subdomain or subfolder path totally). There’s a checkbox to change site and home URL. Make sure that’s checked before you hit save. 2) Change the … Read more

Strict Standards: Non-static method in sidebar generator

There’s not a huge amount you can do about this. Many developers turn off strict errors, as they are pervasive (there are even some in core). Of course it could be fixed – but then what? It’s a plugin, so the next time you update that plugin, your changes will be overwritten.

Get ID of a NextGen album that is linked to a subpage [closed]

I got some help from Benjamin at the WordPress support forums The solution I ended up with is the following: global $nggdb; $galleries = array(); $children = get_children(“post_parent=$post->ID”); foreach($children as $kid) { print_r($kid); $page_id = $kid->ID; $album_mapper = C_Album_Mapper::get_instance(); $albums = $album_mapper->find_all(array(‘pageid = %s’, $page_id), TRUE); foreach ($albums as $albumMap) { $albumID = $albumMap->ID(); After … Read more

in_category in index.php

The following code is working for me. I tied in a child theme of TwentyTwelve. Just copy and replace your index.php with the following and let me know (And don’t forget to change the category slug as per your database): <?php if( have_posts() ) : while( have_posts() ) : the_post(); if(in_category(‘aciform’)) { echo ‘<h2>’.get_the_title().'</h2>’; } … Read more