sidebardaki kategori sayısı fazla olduğu için 2 sütun yapmak istiyorum.
sidebar.php dosyası şu şekilde:
<?php /** * The sidebar containing the main widget area, displays on posts and pages. * * If no active widgets in this sidebar, these widgets will be shown by default. * * @subpackage Blogotron * @since Blogotron 1.4 */ ?> <div id="sidebar" role="complementary"> <?php if( ! dynamic_sidebar( 'main-sidebar' ) ) : ?> <aside id="search" class="widget"> <?php get_search_form(); ?> </aside><!-- #search --> <aside id="recent-posts" class="widget"> <h3 class="widget-title"><?php _e( 'recent posts', 'blogotron' ); ?></h3> <ul> <?php foreach( wp_get_recent_posts( array( 'numberposts' => '5', 'orderby' => 'post_date', 'post_status' => 'publish' ), ARRAY_A ) as $post ) : ?> <li><a href="<?php echo get_permalink( $post[ 'ID' ] ); ?>"><?php echo esc_attr( $post[ 'post_title' ] ); ?></a></li> <?php endforeach; // foreach( wp_get_recent_posts() ) ?> </ul><!-- ul --> </aside><!-- #recent-posts --> <aside id="recent-comments" class="widget"> <h3 class="widget-title"><?php _e( 'recent comments', 'blogotron' ); ?></h3> <ul> <?php foreach( get_comments( array( 'status' => 'approve', 'number' => 5 ) ) as $comment ) : ?> <li><a href="<?php echo $comment->comment_author_url; ?>"><?php echo $comment->comment_author; ?></a> <?php _e( 'on', 'blogotron' ); ?> <a href="<?php echo get_permalink($comment->ID)."#comment-" . $comment->comment_ID ?>"><?php echo get_the_title( $comment->comment_post_ID ); ?></a></li> <?php endforeach; // foreach( get_comments() ) ?> </ul><!-- ul --> </aside><!-- #recent-comments --> <aside id="archives" class="widget"> <h3 class="widget-title"><?php _e( 'archives', 'blogotron' ); ?></h3> <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul><!-- ul --> </aside><!-- #archives --> <aside id="categories" class="widget"> <h3 class="widget-title"><?php _e( 'categories', 'blogotron' ); ?></h3> <ul><?php wp_list_categories( array( 'hierarchical' => 0, 'show_count' => 0, 'title_li' => '' ) ); ?></ul><!-- ul --> </aside><!-- #categories --> <?php endif // if( !dynamic_sidebar( 'main-sidebar' ) ) ?> </div><!-- #sidebar -->css dosyasında ilgili bölümde şu şekilde:
* Sidebar styles
*/
#sidebar {
width: 300px;
margin: 6px 0 0;
float: right;
font-weight: 600;
}
#sidebar .widget {
margin: 0 0 53px;
color: #999;
}
#sidebar form {
position: relative;
margin: 0;
padding: 0;
}
#sidebar .widget .searchform input[type="text"] {
width: 170px;
font-weight: 300;
}
#sidebar .widget .searchform input[type="submit"] {
position: absolute;
text-transform: uppercase;
width: 102px;
right: 0;
}
#sidebar .widget-title {
padding: 15px 0;
margin: 0 0 20px;
text-transform: uppercase;
font-size: 11px;
font-weight: 400;
word-wrap: break-word;
color: #aaa;
border-top: 1px dotted #ddd;
border-bottom: 1px dotted #ddd;
}
#sidebar .widget {
word-wrap: break-word;
}
#sidebar .widget a {
text-decoration: none;
color: #555;
}
#sidebar .widget a:hover {
color: #e6715a;
}
#sidebar .widget ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar .widget ul li {
word-wrap: break-word;
}
#sidebar .widget ul li ul {
padding: 0 0 0 20px;
}
#sidebar .widget_rss ul li {
margin: 0 0 21px;
}
#sidebar .widget_rss span.rss-date,
#sidebar .widget_rss cite {
display: block;
color: #666;
font-weight: 400;
}
#sidebar .widget_calendar table {
width: 100%;
margin: 0;
text-align: center;
border-collapse: collapse;
border-spacing: 0;
border: none;
}
#sidebar .widget_calendar caption {
padding: 10px;
font-size: 13px;
text-align: center;
text-transform: uppercase;
color: #555;
border: none;
}
#sidebar .widget_calendar thead th {
text-align: center;
color: #555;
border: none;
background: #f1f1f1;
}
#sidebar .widget_calendar tbody th,
#sidebar .widget_calendar tbody td {
text-align: center;
border: none;
}
#sidebar .widget_calendar tbody td#today {
background: #fcfcfc;
}
#sidebar .widget_calendar tfoot td {
text-transform: uppercase;
border: none;
}
#sidebar .widget_calendar table a {
font-weight: 700;
}
/**bayağı kurcaladım ama kod bilgisi olmayan biri için bir hayli zor bişey.var mı nasıl yapacağımı söyleyecek bir hayırsever?