コード例 #1
0
ファイル: functions.php プロジェクト: jmawebco/wordpress1
function wicked_indexloop()
{
    // load the custom options
    global $childoptions;
    foreach ($childoptions as $value) {
        ${$value}['id'] = get_option($value['id'], $value['std']);
    }
    query_posts("posts_per_page=4&cat=" . $wicked_feature_cat);
    $counter = 1;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            ?>
    <div id="post-<?php 
            the_ID();
            ?>
" class="<?php 
            thematic_post_class();
            ?>
">
      <?php 
            thematic_postheader();
            if ($counter == 1 && has_post_thumbnail() && !is_paged()) {
                the_post_thumbnail('homepage-thumbnail');
            }
            ?>
      <div class="entry-content">
        <?php 
            the_excerpt();
            ?>
        <a href="<?php 
            the_permalink();
            ?>
" class="more"><?php 
            echo more_text();
            ?>
</a>
        <?php 
            $counter++;
            ?>
      </div>
    </div><!-- .post -->
  <?php 
        }
    } else {
        ?>
    <h2>Eek</h2>
    <p>There are no posts to show!</p>
  <?php 
    }
    wp_reset_query();
}
コード例 #2
0
ファイル: functions.php プロジェクト: jmawebco/wordpress1
function wicked_indexloop()
{
    query_posts("posts_per_page=4");
    $counter = 1;
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            ?>
    <div id="post-<?php 
            the_ID();
            ?>
" class="<?php 
            thematic_post_class();
            ?>
">
      <?php 
            thematic_postheader();
            if ($counter == 1 && has_post_thumbnail() && !is_paged()) {
                the_post_thumbnail('homepage-thumbnail');
            }
            ?>
      <div class="entry-content">
        <?php 
            the_excerpt();
            ?>
        <a href="<?php 
            the_permalink();
            ?>
" class="more"><?php 
            echo more_text();
            ?>
</a>
        <?php 
            $counter++;
            ?>
      </div>
    </div><!-- .post -->
  <?php 
        }
    } else {
        ?>
    <h2>Eek</h2>
    <p>There are no posts to show!</p>
  <?php 
    }
    wp_reset_query();
}
コード例 #3
0
ファイル: attachment.php プロジェクト: ramblinollie/VAM
?>
">
            
    			<?php 
// creating the post header
thematic_postheader();
?>
                
				<div class="entry-content">
					<div class="entry-attachment"><?php 
the_attachment_link($post->post_ID, true);
?>
</div>
                    
                        <?php 
the_content(more_text());
wp_link_pages('before=<div class="page-link">' . __('Pages:', 'thematic') . '&after=</div>');
?>
                        
				</div>
                
				<?php 
// creating the post footer
thematic_postfooter();
?>
                
			</div><!-- .post -->

            <?php 
comments_template();
?>
コード例 #4
0
function thematic_content()
{
    if (is_home() || is_front_page()) {
        $content = 'full';
    } elseif (is_single()) {
        $content = 'full';
    } elseif (is_tag()) {
        $content = 'excerpt';
    } elseif (is_search()) {
        $content = 'excerpt';
    } elseif (is_category()) {
        $content = 'excerpt';
    } elseif (is_author()) {
        $content = 'excerpt';
    } elseif (is_archive()) {
        $content = 'excerpt';
    }
    $content = apply_filters('thematic_content', $content);
    if (strtolower($content) == 'full') {
        $post = get_the_content(more_text());
        $post = apply_filters('the_content', $post);
        $post = str_replace(']]>', ']]&gt;', $post);
    } elseif (strtolower($content) == 'excerpt') {
        $post = get_the_excerpt();
    } elseif (strtolower($content) == 'none') {
    } else {
        $post = get_the_content(more_text());
        $post = apply_filters('the_content', $post);
        $post = str_replace(']]>', ']]&gt;', $post);
    }
    echo apply_filters('thematic_post', $post);
}
コード例 #5
0
 function thematic_content()
 {
     global $thematic_content_length;
     if (strtolower($thematic_content_length) == 'full') {
         $post = get_the_content(more_text());
         $post = apply_filters('the_content', $post);
         $post = str_replace(']]>', ']]&gt;', $post);
     } elseif (strtolower($thematic_content_length) == 'excerpt') {
         $post = '';
         $post .= get_the_excerpt();
         $post = apply_filters('the_excerpt', $post);
         if (apply_filters('thematic_post_thumbs', TRUE)) {
             $post_title = get_the_title();
             $size = apply_filters('thematic_post_thumb_size', array(100, 100));
             $attr = apply_filters('thematic_post_thumb_attr', array('title' => 'Permalink to ' . $post_title));
             if (has_post_thumbnail()) {
                 $post = '<a class="entry-thumb" href="' . get_permalink() . '" title="Permalink to ' . get_the_title() . '" >' . get_the_post_thumbnail(get_the_ID(), $size, $attr) . '</a>' . $post;
             }
         }
     } elseif (strtolower($thematic_content_length) == 'none') {
     } else {
         $post = get_the_content(more_text());
         $post = apply_filters('the_content', $post);
         $post = str_replace(']]>', ']]&gt;', $post);
     }
     echo apply_filters('thematic_post', $post);
 }
コード例 #6
0
	function widget($args,$instance){
		//Handles outputting the widgets content to theme
		extract($args, EXTRA_SKIP);
		echo $before_widget;
		$categories1 = $this->extractCategories($instance['include_cats1']);
		$post_per_page = $instance['dw_loop_posts_limit1'];
		query_posts("posts_per_page=".$post_per_page."&cat=".$categories1);
		$counter = 1;
		?><div class="dw-latest-headlines">
		<div class="dw-title-block"><h1><? echo $instance['headline1']; ?></h1></div><?php
		if(have_posts()) : while (have_posts()) : the_post(); 
			if(!is_sticky()):
		?> 
			<div id="post-<?php the_id() ?>" class="dw-home-posts">
			<?php thematic_postheader();
			if($counter == 1 && has_post_thumbnail()) {
				the_post_thumbnail('homepage-thumbnail');
			} ?>
			<div class="entry-content">
				<?php the_excerpt(); ?>
				<a href="<?php the_permalink(); ?>" class="more"><?php echo more_text() ?></a>
				<?php $counter++; ?>
			</div>
		   </div><!-- .post -->
		<?php endif; ?>
		<?php endwhile; else: ?>
			<!-- No post available -->
		<?php endif; ?>
		<?php
		#####
		## Start second loop
		###
        wp_reset_query();
        $categories2 = $this->extractCategories($instance['include_cats2']);
		$post_per_page2 = $instance['dw_loop_posts_limit2'];
		query_posts("posts_per_page=".$post_per_page2."&cat=".$categories2);
        $counter = 1;
        ?>
        <div class="dw-title-block"><h1><? echo $instance['headline2']; ?></h1></div><?php
        if(have_posts()) : while (have_posts()) : the_post(); 
            if(is_sticky()):
        ?> 
            <div id="post-<?php the_id() ?>" class="dw-home-posts">
            <?php thematic_postheader();
            if($counter == 1 && has_post_thumbnail()) {
                the_post_thumbnail('homepage-thumbnail');
            } ?>
           </div><!-- .post -->
        <?php endif; ?>
        <?php endwhile; else: ?>
            <!-- No post available -->
        <?php endif; ?>
        <!-- /dw-sticky-headlines -->
         <?php
		 ######
		 ## Start 3rd loop
		 ######
        wp_reset_query();
        $categories3 = $this->extractCategories($instance['include_cats3']);
		$post_per_page3 = $instance['dw_loop_posts_limit3'];
		query_posts("posts_per_page=".$post_per_page3."&cat=".$categories3);
        $counter = 1;
        ?>
        <div class="dw-title-block"><h1><? echo $instance['headline3']; ?></h1></div><?php
        if(have_posts()) : while (have_posts()) : the_post(); 
            if(!is_sticky()):
        ?> 
            <div id="post-<?php the_id() ?>" class="dw-home-posts">
            <?php thematic_postheader();
            if($counter == 1 && has_post_thumbnail()) {
                the_post_thumbnail('homepage-thumbnail');
            } ?>
           </div><!-- .post -->
        <?php endif; ?>
        <?php endwhile; else: ?>
            <!-- No post available -->
        <?php endif; ?>
         </div><!-- /dw-latest-headlines -->
         </div>
         <?php
        wp_reset_query();
	   echo $after_widget;	
	} // end widget function