Block tools menu in wp-admin?

You can for example add this: foreach( array( ‘tools’, ‘import’, ‘export’ ) as $x ) { add_action( “load-{$x}.php”, function() { if( ! current_user_can( ‘manage_options’ ) ) wp_die( __( ‘No access!’ ) ); } ); } to restrict access to the {tools,import,export}.php pages for non-admins.

Custome column sort by date not title

After a lot of guess work and research I’ve managed to come up with a simple solution. function column_orderby( $vars ) { $vars[‘orderby’] = ‘date’; $vars[‘order’] = ‘desc’; return $vars; } add_filter( ‘request’, ‘column_orderby’ ); This will sort all of the columns by ‘date’ as well as order them by ‘desc’! Hope it helps anyone … Read more

Moved from WP.Domain to Primary Domain, Can’t Login

You can’t use http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory to move from a subdomain to a domain. WordPress can be moved up or down a directory level, but the same technique can’t be used for subdomain – really a different domain – to another domain. Follow Moving WordPress « WordPress Codex and WordPress Serialized PHP Search Replace Tool. The main … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)