-
Daniel TaraKeymaster
You can find the links below each post in functions.php inside the
pinboard_entry_meta()
function. The function you need to insert theme iscomments_popup_link()
.LisaParticipantThanks Daniel, but I don’t understand what code exactly I’m supposed to paste? This is the part of coding you are referring to:
function pinboard_entry_meta() { if( ! pinboard_is_teaser() ) : ?> <aside class="entry-meta"> <?php if( is_category( pinboard_get_option( 'portfolio_cat' ) ) || in_category( pinboard_get_option( 'portfolio_cat' ) ) ) : ?> <span class="custom-meta entry-category"><?php the_category( ' / ' ); ?></span> <?php $meta_keys = get_post_meta( get_the_ID() ); ?> <?php foreach( $meta_keys as $meta => $value ) : ?> <?php if( ( '_' != $meta[0] ) && ( 'enclosure' != $meta ) ) : ?> <span class="custom-meta"><strong><?php echo $meta; ?>:</strong> <?php echo $value[0]; ?></span> <?php endif; ?> <?php endforeach; ?> <?php else : ?> <span class="entry-author-link"><?php the_author_posts_link(); ?></span> <?php if( ! is_singular() ) : ?> <span class="entry-date"><a href="<?php echo get_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span> <?php else : ?> <span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span> <?php endif; ?> <?php if( ! is_attachment() ) : ?> <span class="entry-category"><?php the_category( ', ' ); ?></span> <?php elseif( wp_attachment_is_image() ) : ?> <span class="attachment-size"><a href="<?php echo wp_get_attachment_url(); ?>" title="<?php _e( 'Link to full-size image', 'pinboard' ); ?>"><?php $metadata = wp_get_attachment_metadata(); echo $metadata['width']; ?> × <?php echo $metadata['height']; ?></a> <?php _e( 'pixels', 'pinboard' ); ?></span> <?php endif; ?> <?php edit_post_link( __( 'Edit', 'pinboard' ), '<span class="edit-link">', '</span>' ); ?> <?php if( ! is_singular() ) : ?> <span class="entry-permalink"><a href="<?php echo get_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">Permalink</a></span> <?php endif; ?> <?php endif; ?> <div class="clear"></div> </aside><!-- .entry-meta --> <?php endif; }
I understand I’m supposed to paste something in between, but what exactly and where?
Daniel TaraKeymasterTry inserting it before this line:
<?php edit_post_link( __( 'Edit', 'pinboard' ), '<span class="edit-link">', '</span>' ); ?>
wrapped in php tags like this:
<span class="entry-comments"></span>
LisaParticipantAwesome, thanks! The code mentioned above didn’t work for me, but for others who might be interested, this is what I put in my code and it works like a charm now π
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment' ), __( '1 Comment' ), __( '% Comments' ) ); ?></span>
Thanks again Daniel!
You must be logged in to reply to this topic.