Created
January 29, 2014 09:10
-
-
Save furahaclothing/8684262 to your computer and use it in GitHub Desktop.
WP favorite post テンプレート
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
<div class="entry-text"><?php wpfp_clear_list_link(); ?></div> | |
<?php $favorite_post_ids = wpfp_get_user_meta() ?> | |
<?php if ($favorite_post_ids): | |
$favorite_post_ids = array_reverse($favorite_post_ids); | |
$post_per_page = 20; | |
$page = intval(get_query_var('paged')); | |
query_posts(array('post__in' => $favorite_post_ids, 'posts_per_page'=> $post_per_page, 'orderby' => 'post__in', 'paged' => $page)); ?> | |
<div id="fave_posts_thumbnails"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div class="thumb-gallery"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute() ); ?>"><?php usces_the_itemImage($number = 0, $width = 150, $height = 150 ); ?></a></a><br><div class="remove-link"><?php wpfp_remove_favorite_link(get_the_ID());?></div></div> | |
<?php endwhile; ?> | |
</div> | |
<div style="clear:both;"></div> | |
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { | |
$imageloc = get_bloginfo('template_directory'); | |
next_posts_link( __( '<div class="nav-previous"><img src="' . $imageloc . '/images/next.png"></div>', 'thisis' ) ); | |
previous_posts_link( __( '<div class="nav-next"><img src="' . $imageloc . '/images/previous.png"></div>', 'thisis' ) ); | |
} | |
wp_reset_query(); | |
else: ?> | |
<div class="entry-text"> | |
<?php echo $wpfp_options['favorites_empty']; ?> | |
</div>; | |
<?php endif; ?> | |
<?php wpfp_cookie_warning(); | |
wp_reset_postdata(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment