Minimatica WordPress Theme: Hacking the category.php file

I wanted to put the category list in the sidebar, so here’s my hack.

 

<?php
/**
* Template for category archives
*
* @package WordPress
* @subpackage Minimatica
* @since Minimatica 1.0
*/

get_header(); ?>
<?php if( ( ‘gallery’ == minimatica_get_option( ‘category_view’ ) ) && ( get_query_var( ‘cat’ ) != minimatica_get_option( ‘blog_category’ ) ) ) : ?>
<div id=”slider”>
<?php get_template_part( ‘loop’, ‘slider’ ); ?>
</div><!– #slider –>
<?php else : ?>
<div>
<h1><?php single_cat_title(); ?></h1>
</div><!– .title-container –>
<div id=”container”>
<?php get_template_part( ‘loop’, ‘category’ ); ?>
<?php
echo “Galleries”;
wp_list_categories(‘title_li=’); ?>
<?php get_sidebar(); ?>
<div></div>
</div><!– #container –>
<?php endif; ?>
<?php get_footer(); ?>

<*> Because it’s in the sidebar the list shows with bullets.  To remove the bullets, I added   list-style: none; to the #container part of the style.css file.

#container {
width:940px;
margin:0 auto;
margin-bottom:20px;
border-bottom:#CCC 1px solid;
list-style: none;
}

 

Minimatica WordPress Theme: Hacking the loop.php file

I love the Minimatica theme by onedesigns.com (thanks Daniel!) . There were a few things I changed to suit my tastes better, one of which was to the loop.php file.  For example, I didn’t need the folded, author, time-date stamp biz which hovers over the thumbnails in the blog view – so here’s my mod:

<?php
/**
* The Main Loop
*
* Used as fallback if no specific loop file found
*
* @package WordPress
* @subpackage Minimatica
* @since Minimatica 1.0
*/
?>

<?php if( have_posts() ) : ?>
<div id=”content” role=”main”>
<?php while( have_posts() ) : the_post(); ?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header>
<?php if( has_post_thumbnail() ) : ?>
<a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”>
<?php the_post_thumbnail( ‘homepage-thumb’ ); ?>
</a>
<?php endif; ?>
<h2><a href=”<?php the_permalink(); ?>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”><?php the_title(); ?></a></h2>
<!– .entry-meta –>
</header><!– .entry-header –>
<section>
<?php the_excerpt(); ?>
</section><!– .entry-summary –>
<footer>
</footer><!– entry-footer –>
</article><!– .post –>
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id=”posts-nav”>
<div><?php next_posts_link( ‘&larr; ‘ . __( ‘Older Posts’, ‘minimatica’ ) ); ?></div>
<div><?php previous_posts_link( __( ‘Newer Posts’, ‘minimatica’ ) . ‘ &rarr;’ ); ?></div>
<div></div>
</div><!– #nav-above –>
<?php endif; ?>
</div><!– #content –>
<?php else : ?>
<div id=”content”>
<div id=”post-0″ <?php post_class(); ?>>
<div>
<p><?php _e( ‘The content you were looking for could not be found.’, ‘minimatica’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</div><!– .post –>
</div><!– #content –>
<?php endif; ?>

Learning about sorting files alphabetically the hard way

Found out yesterday that item-2.mp3 sorts higher alphabetically in a list than item.mp3 😐
For example:
item-2.mp3
item.mp3

This unfortunate file naming behavior occurs when dragging an iTunes playlist with duplicate song titles to a folder on the desktop. My MySQL import got all messed up thanks to that…
Thanks to Automator, one solution was to re-write the files as item.mp3 and item2.mp3 and so on (which sorts as expected):
item.mp3
item2.mp3