Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Tiny Category List Options */
- $tiny_category_list_number = mt_get_option('maggie_tiny_category_list_number');
- /* Tiny category list one */
- $tiny_category_id_one = mt_get_option('maggie_tiny_category_list_cat_one');
- $tiny_category_name_one = get_cat_name($tiny_category_id_one);
- $tiny_category_link_one = get_category_link($tiny_category_id_one);
- /* Tiny category list two */
- $tiny_category_id_two = mt_get_option('maggie_tiny_category_list_cat_two');
- $tiny_category_name_two = get_cat_name($tiny_category_id_two);
- $tiny_category_link_two = get_category_link($tiny_category_id_two);
- /* Tiny category list three */
- $tiny_category_id_three = mt_get_option('maggie_tiny_category_list_cat_three');
- $tiny_category_name_three = get_cat_name($tiny_category_id_three);
- $tiny_category_link_three = get_category_link($tiny_category_id_three);
- ?>
- <?php if ($tiny_category_id_one == true) : ?>
- <div class="block_11 alpha">
- <div class="list-entry tiny-list clearfix">
- <h4 class="widget-title"><span><a href="<?php echo ($tiny_category_link_one); ?>" title="<?php echo ($tiny_category_name_one); ?>"><?php echo ($tiny_category_name_one); ?></a></span></h4>
- <ul>
- <?php
- $tiny_category_list = new WP_Query(); // set a new the query.
- $tiny_category_list->query('posts_per_page='.$tiny_category_list_number.'&cat='.$tiny_category_id_one);
- if ($tiny_category_list->have_posts()) : while ($tiny_category_list->have_posts()) : $tiny_category_list->the_post();
- ?>
- <li>
- <article <?php post_class(); ?>>
- <div class="entry-header">
- <h5 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'maggie' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo substr(get_the_title(), 0, 58); if(strlen(get_the_title()) > 58) : ?>...<?php endif; ?></a></h5>
- <div class="entry-meta">
- <?php the_time('F j, Y');?>
- <?php _e(', ','maggie'); comments_popup_link(__('No comments', 'maggie'), __('1 comment', 'maggie'), __('% comments', 'maggie')); ?>
- </div>
- </div>
- </article>
- </li>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php wp_reset_query(); // kick the query ass. ?>
- </ul>
- </div><!-- .tiny-list-entry-two-->
- </div>
- <?php endif; ?>
- <?php if ($tiny_category_id_two == true) : ?>
- <div class="block_11">
- <div class="list-entry tiny-list clearfix">
- <h4 class="widget-title"><span><a href="<?php echo ($tiny_category_link_two); ?>" title="<?php echo ($tiny_category_name_two); ?>"><?php echo ($tiny_category_name_two); ?></a></span></h4>
- <ul>
- <?php
- $tiny_category_list = new WP_Query(); // set a new the query.
- $tiny_category_list->query('posts_per_page='.$tiny_category_list_number.'&cat='.$tiny_category_id_two);
- if ($tiny_category_list->have_posts()) : while ($tiny_category_list->have_posts()) : $tiny_category_list->the_post();
- ?>
- <li>
- <article <?php post_class(); ?>>
- <div class="entry-header">
- <h5 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'maggie' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo substr(get_the_title(), 0, 58); if(strlen(get_the_title()) > 58) : ?>...<?php endif; ?></a></h5>
- <div class="entry-meta">
- <?php the_time('F j, Y');?>
- <?php _e(', ','maggie'); comments_popup_link(__('No comments', 'maggie'), __('1 comment', 'maggie'), __('% comments', 'maggie')); ?>
- </div>
- </div>
- </article>
- </li>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php wp_reset_query(); // kick the query ass. ?>
- </ul>
- </div><!-- .tiny-list-entry-two-->
- </div>
- <?php endif; ?>
- <?php if ($tiny_category_id_three == true) : ?>
- <div class="block_11 omega">
- <div class="list-entry tiny-list clearfix">
- <h4 class="widget-title"><span><a href="<?php echo ($tiny_category_link_three); ?>" title="<?php echo ($tiny_category_name_three); ?>"><?php echo ($tiny_category_name_three); ?></a></span></h4>
- <ul>
- <?php
- $tiny_category_list = new WP_Query(); // set a new the query.
- $tiny_category_list->query('posts_per_page='.$tiny_category_list_number.'&cat='.$tiny_category_id_three);
- if ($tiny_category_list->have_posts()) : while ($tiny_category_list->have_posts()) : $tiny_category_list->the_post();
- ?>
- <li>
- <article <?php post_class(); ?>>
- <div class="entry-header">
- <h5 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'maggie' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php echo substr(get_the_title(), 0, 58); if(strlen(get_the_title()) > 58) : ?>...<?php endif; ?></a></h5>
- <div class="entry-meta">
- <?php the_time('F j, Y');?>
- <?php _e(', ','maggie'); comments_popup_link(__('No comments', 'maggie'), __('1 comment', 'maggie'), __('% comments', 'maggie')); ?>
- </div>
- </div>
- </article>
- </li>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php wp_reset_query(); // kick the query ass. ?>
- </ul>
- </div><!-- .tiny-list-entry-three-->
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement