sdelamorena
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Atahualpa] [Theme: Atahualpa] Rotating header issuesForum: Themes and Templates
In reply to: showin the_excerpt in "most commented" postsThere are many errors, for example:
1) On line 17, this
<?}?>
must be<?php } ?>
.2) I forgot on the excerpt:
add after
$commentcount = $post->comment_count;
this$excerpt = $post->post_excerpt;
And replace
<?php the_excerpt(); ?>
with<?php echo $excerpt; ?>
Its a miracle if works, the code is very bad assembled…
Forum: Themes and Templates
In reply to: showin the_excerpt in "most commented" postsIn the database query you must select the excerpt.
Replace:
$result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 3");
With:
$result = $wpdb->get_results("SELECT comment_count, ID, post_title, post_excerpt FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 3");
And try!
Forum: Themes and Templates
In reply to: Does not install widgets in sidebar.If is registed the sidebar, you are doing something bad.
Check all the steps with this tutorial. It’s simple.
Forum: Themes and Templates
In reply to: Does not install widgets in sidebar.You need register the sidebar.
Forum: Themes and Templates
In reply to: Hardcode "like" into post footerThe facebook like button use iframe. It’s impossible do button as we do with Twitter.
Try this:
<div class="facebook_link"><iframe src="https://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100px; height:30px"></iframe></div>
You have more info on Facebook Developers: https://developers.facebook.com/docs/reference/plugins/like/
Forum: Themes and Templates
In reply to: Comment linkTry with this (The same fragment of code):
<?php $comments = get_comments('status=approve&number=5'); ?> <div class="recentcomm"> <ul> <?php foreach ($comments as $comment) { ?> <li> <div style="margin:0 10px 0 0;float:left;"><?php echo get_avatar( $comment, '35' ); ?></div> <?php echo strip_tags($comment->comment_author); ?>: <a style="margin: 0 0 5px 0;" href="<?php echo get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID ?>"><?php echo wp_html_excerpt( $comment->comment_content, 45 ); ?>... </a> </li> <div style="clear:both;margin:0 0 5px 0;"></div> <?php } ?> </ul> </div>
Or replace the href content with the right comment link:
<?php echo get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID ?>
Forum: Themes and Templates
In reply to: Mimimalist Theme Categories Problem1) Edit archive.php on theme directory: search 15, 17, 19 lines and replace or delete “News for”.
2) For go to the next posts, you can use a plugin for a pager (WP-PageNavi, for example) or add the previous post link and next post link on index.php.
Forum: Themes and Templates
In reply to: How did they do this on their wordpress theme?They use the post thumbnail function in the loop.
For example, with a category:
<?php while ( have_posts() ) : the_post(); ?> <div class="labelitem1"> <a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail(array(141,141)); ?> </a> </div> <?php endwhile; ?>