WordPress theming access for designers

Ever encoutered the following issue:  you want to give theming access to your worpdress designer, but cannot communicate the FTP account ? you have two solutions : first is to build specific FTP access for the theme directory you're working on. Second solution comes from DIY DESIGN, a theming company who have implemented a backup, upload, download for their custom themes, that for this particular usage they call skins, via the thesis skin manager introduced in their newest version of the thesis framework theme..

Magazine layout for wordpress : latest article for each category

a quick and efficient way of ensuring you have a permanent display of various articles on the front page of your wordpress blog is to alter the main query to get only one article per category. this can be done using specific join filters, as described on this wordpress support blog discussion. a very simple solution consists of including the alter-query.php file before the main query is executed. Here is the content of this file :

if (is_home())

{

 

function recent_join ( $join, $query ) {

global $wpdb;

$taxonomy = 'category';

$join .=<<<SQL

JOIN( SELECT MAX( {$wpdb->posts}.post_date ) AS post_date, trm.term_id AS term_ID FROM {$wpdb->posts}

LEFT JOIN {$wpdb->term_relationships} AS rel ON {$wpdb->posts}.ID=rel.object_ID

LEFT JOIN {$wpdb->term_taxonomy} AS tax USING( term_taxonomy_id )

LEFT JOIN {$wpdb->terms} AS trm USING( term_id )

WHERE tax.taxonomy='{$taxonomy}' GROUP BY trm.term_id ) AS pmx USING( post_date )

SQL;

return $join;

}

add_filter ( 'posts_join', 'recent_join', 10, 2 );

 

function recent_fields ( $fields, $query ) {

global $wpdb;

return $fields . ', term_ID';

}

add_filter ( 'posts_fields', 'recent_fields', 10, 2 );

 

$args = array (

'post_type' => 'post',

'taxonomy' => 'category',

'paged' => get_query_var ( 'paged' ) ? get_query_var ( 'paged' ) : 1

);

)