Order taxonomy terms by the frequency of use in the last 30 days

First thing’s first — You’ll have to add that table. The way you do that if you were writing this in a plugin is as follows: function customtaxorder_init() { global $wpdb; $init_query = $wpdb->query(“SHOW COLUMNS FROM $wpdb->terms LIKE ‘term_order'”); if ($init_query == 0) { $wpdb->query(“ALTER TABLE $wpdb->terms ADD `term_order` INT( 4 ) NULL DEFAULT ‘0’”); … Read more

How to access & display images from a post without textual content ( and vice versa) according to best wordpress practices

This is really a CSS/HTML question as WordPress does not control your layout/styles. You can use one loop and fling the data wherever you want basically. For instance you can wrap individual functions in their own markup //loop start <div class=”left”><?php the_title(); ?></div> //float this title left <div class=”right”><?php the_content(); ?></div> //float this content right … Read more

If more than 1 image show post link?

check how many posts were returned in your $attachments variable and output your desired markup for each case: $featured = get_post_meta($post->ID,’_thumbnail_id’,true); $attachments = get_children( ‘post_type=attachment&orderby=menu_order&exclude=”.$featured.”&post_mime_type=image&post_parent=”.$post->ID ); if( count( $attachments ) > 1 ): // more than 1 attachment else: // just 1 (or 0) endif;