Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use core "featured image" instead of homemade stuff
use core jQuery removed obsolete scripts and options
- Loading branch information
Showing
11 changed files
with
62 additions
and
5,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,32 @@ | ||
<?php | ||
if (have_posts()) : | ||
$i = 1; // set variable used to control which style is applied to thumbnail | ||
while (have_posts()) : | ||
the_post(); | ||
|
||
// check if $i is divisible by 2 with no remainder then apply style to variable $c | ||
if ($i % 2 == 0) | ||
{ | ||
$c = ' class="alt"'; | ||
} | ||
else | ||
{ | ||
$c = ''; | ||
} | ||
|
||
// retreive thumbnail custom field value | ||
?> | ||
<li<?php echo $c ?>> | ||
<?php | ||
|
||
$i = 1; // set variable used to control which style is applied to thumbnail | ||
|
||
if (have_posts()) : while (have_posts()) : the_post(); // check if there are any posts | ||
|
||
if ($i % 2 == 0) { // check if $i is divisible by 2 with no remainder then apply style to variable $c | ||
$c = ' class="alt"'; | ||
} else { | ||
$c = ''; | ||
} | ||
|
||
$post_id = $post->ID; | ||
$single = true; | ||
|
||
|
||
$image = grace_get_featured_image($post); | ||
$theme_options = get_option('Grace'); | ||
if (true ||!isset($theme_options["autothumb"]) || $theme_options["autothumb"] == "timthumbon") | ||
{ | ||
$info = wp_get_attachment_image_src($image->ID, 'original'); | ||
$thumbnail_value = '<img src="' . get_bloginfo('template_directory') . '/scripts/timthumb.php?src=' . $info[0] . '&w=280&h=140&zc=1" title="' . get_the_title() . '" alt="' . get_the_title() . '" />'; | ||
} | ||
else | ||
{ | ||
$thumbnail_value = wp_get_attachment_image($image->ID, 'medium', false, array('alt' => get_the_title(), 'title' => get_the_title())); | ||
} | ||
|
||
if ( $thumbnail_value ) : // retreive thumbnail custom field value | ||
|
||
if (has_post_thumbnail()): | ||
the_post_thumbnail('post-thumbnail', array('title' => '') ); | ||
else: | ||
?><a href="<?php the_permalink() ?>"><strong><?php the_title(); ?></strong></a><br/><?php the_excerpt(); | ||
endif; | ||
?> | ||
</li> | ||
|
||
<li<?php echo $c ?>> | ||
<a href="<?php the_permalink() ?>"> | ||
<?php echo $thumbnail_value; ?> | ||
</a> | ||
</li> | ||
|
||
<?php $i++; else :?> | ||
|
||
<li<?php echo $c ?>><a href="<?php the_permalink() ?>"><strong><?php the_title(); ?></strong></a><br/><?php the_excerpt(); ?></li> | ||
|
||
<?php $i++; endif; endwhile; endif; ?> | ||
<?php | ||
$i++; | ||
endwhile; | ||
endif; |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.