SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | /** | |
3 | * The loop that displays posts. | |
4 | * | |
5 | * The loop displays the posts and the post content. See | |
6 | * http://codex.wordpress.org/The_Loop to understand it and | |
7 | * http://codex.wordpress.org/Template_Tags to understand | |
8 | * the tags used in it. | |
9 | */ | |
10 | ?> | |
11 | ||
12 | <?php /* If there are no posts to display, such as an empty archive page */ ?> | |
13 | <?php if ( ! $wp_query->have_posts() ) : ?> | |
14 | <div id="post-0" class="post clearfix error404 not-found post-no-image"> | |
15 | <div class="post-content-wrapper"> | |
16 | <h2 class="post-title"><?php _e( 'Not Found', 'unisphere' ); ?></h2> | |
17 | <div class="post-text"> | |
18 | <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'unisphere' ); ?></p> | |
19 | <?php get_search_form(); ?> | |
20 | </div> | |
21 | </div> | |
22 | </div> | |
23 | <?php endif; ?> | |
24 | ||
25 | <?php | |
26 | /* | |
27 | * Start the Loop. | |
28 | */ ?> | |
29 | <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?> | |
30 | ||
31 | <?php $customdisplay = get_post_custom_values("resumen"); ?> | |
32 | - | <?php /** EDIT See if we want the Content or excerpt? */ ?> |
32 | + | |
33 | - | <?php |
33 | + | <?php if (isset($customdisplay[0])) { ?> |
34 | - | global $post; |
34 | + | |
35 | - | $excerpt = get_metadata( $post->ID,'excerpt', true ); |
35 | + | |
36 | - | ?> |
36 | + | |
37 | - | <?php /** EDIT added condition $excerpt below */ ?> |
37 | + | |
38 | ||
39 | - | <?php if( !$excerpt || $unisphere_options['show_blog_full'] != '1') : // User has not checked the option to display full posts in the blog, so use the excerpt template... ?> |
39 | + | |
40 | ||
41 | <?php if( 'open' == $post->comment_status ) : ?> | |
42 | <?php comments_popup_link( __( 'Leave a comment', 'unisphere' ), __( '1 Comment', 'unisphere' ), __( '% Comments', 'unisphere' ), 'comment-count button-unselected rounded-all' ); ?> | |
43 | <?php endif; ?> | |
44 | ||
45 | <a href="<?php the_permalink(); ?>" class="more-link button rounded-all"><?php _e( 'Read more »', 'unisphere' ); ?></a> | |
46 | ||
47 | </div> | |
48 | ||
49 | <div class="post-content-wrapper"> | |
50 | ||
51 | ||
52 | <h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'unisphere' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> | |
53 | ||
54 | <div class="post-meta rounded-all"> | |
55 | ||
56 | <?php printf( __( '<span class="published">Posted on %1$s</span> <span class="author">by %2$s</span>', 'unisphere' ), | |
57 | sprintf( '<abbr class="published-time" title="%1$s">%2$s</abbr>', | |
58 | esc_attr( get_the_time() ), | |
59 | get_the_date() | |
60 | ), | |
61 | sprintf( '<a class="url fn n" href="%1$s" title="%2$s">%3$s</a>', | |
62 | get_author_posts_url( get_the_author_meta( 'ID' ) ), | |
63 | sprintf( esc_attr__( 'View all posts by %s', 'unisphere' ), get_the_author() ), | |
64 | get_the_author() | |
65 | ) | |
66 | ); ?> | |
67 | ||
68 | <br /> | |
69 | ||
70 | ||
71 | <?php | |
72 | $tags_list = get_the_tag_list( '', ', ' ); | |
73 | if ( $tags_list ) : ?> | |
74 | <span class="post-tags"><?php printf( __( 'Tagged %s', 'unisphere' ), $tags_list ); ?></span> | |
75 | <?php endif; ?> | |
76 | ||
77 | </div> | |
78 | ||
79 | <div class="post-text"> | |
80 | <?php the_excerpt(); ?> | |
81 | </div> | |
82 | ||
83 | </div> | |
84 | ||
85 | </div> | |
86 | ||
87 | <?php } else { ?> | |
88 | ||
89 | <!--BEGIN .post-detail--> | |
90 | <div id="post-<?php the_ID(); ?>" class="post-full clearfix <?php semantic_entries(); ?><?php if( unisphere_get_post_image("blog-detail") == '' ) echo ' post-no-image'; ?>"> | |
91 | ||
92 | <h5><?php the_subheading(); ?></h5><br><h2 class="post-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'unisphere' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2><br> | |
93 | - | <?php else : // User wants to display full post content ?> |
93 | + | |
94 | <div class="post-image"> | |
95 | <a href="<?php the_permalink(); ?>"><?php echo unisphere_get_post_image("blog-detail"); ?></a> | |
96 | </div> | |
97 | ||
98 | <div class="post-meta rounded-all"> | |
99 | ||
100 | <?php printf( __( '<span class="published">Posted on %1$s</span> <span class="author">by %2$s</span>', 'unisphere' ), | |
101 | sprintf( '<abbr class="published-time" title="%1$s">%2$s</abbr>', | |
102 | esc_attr( get_the_time() ), | |
103 | get_the_date() | |
104 | ), | |
105 | sprintf( '<a class="url fn n" href="%1$s" title="%2$s">%3$s</a>', | |
106 | get_author_posts_url( get_the_author_meta( 'ID' ) ), | |
107 | sprintf( esc_attr__( 'View all posts by %s', 'unisphere' ), get_the_author() ), | |
108 | get_the_author() | |
109 | ) | |
110 | ); ?><?php edit_post_link('Editar',' ',''); ?> | |
111 | ||
112 | <br /> | |
113 | ||
114 | ||
115 | ||
116 | <?php | |
117 | $tags_list = get_the_tag_list( '', ', ' ); | |
118 | if ( $tags_list ) : ?> | |
119 | <span class="post-tags"><?php printf( __( 'Tagged %s', 'unisphere' ), $tags_list ); ?></span> | |
120 | <?php endif; ?> | |
121 | ||
122 | <div class="share-buttons"> | |
123 | <?php if ( $unisphere_options['show_blog_tweet_button'] == '1' ) : ?> | |
124 | <a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php echo get_permalink(); ?>" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> | |
125 | <?php endif; ?> | |
126 | <?php if ( $unisphere_options['show_blog_fb_like_button'] == '1' ) : ?> | |
127 | <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&layout=standard&show_faces=false&width=350&action=like&colorscheme=<?php if( strpos($unisphere_options['skin'], 'dark') === 0 || strpos($unisphere_options['skin'], 'extra_dark') === 0 ) echo 'dark'; else echo 'light'; ?>&height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:350px; height:20px;" allowTransparency="true" class="facebook-like-button"></iframe><g:plusone size="medium"></g:plusone> | |
128 | <?php endif; ?> | |
129 | </div> | |
130 | ||
131 | </div> | |
132 | ||
133 | <div class="post-text"> | |
134 | <?php the_content('more'); ?> | |
135 | <?php wp_link_pages('before=<div class="wp-pagenavi post_linkpages">&after=</div><br />&link_before=<span>&link_after=</span>'); ?> | |
136 | <?php if( 'open' == $post->comment_status ) : ?> | |
137 | <?php comments_popup_link( __( 'Leave a comment', 'unisphere' ), __( '1 Comment', 'unisphere' ), __( '% Comments', 'unisphere' ), 'comment-count button-unselected rounded-all' ); ?> | |
138 | <?php endif; ?> | |
139 | </div> | |
140 | ||
141 | <!--END .post-detail--> | |
142 | </div> | |
143 | ||
144 | <?php } ?> | |
145 | <?php endwhile; endif; ?> | |
146 | ||
147 | <div class="hr"><hr /></div> |