Support Forum
Hi there,
I'd like to display the number of replies in a forum topic that was posted via the Blog Post Linking plugin a la "Mac rumors" homepage. So on my homepage I display a post that also created a forum topic. A number of people reply to this topic. On the homepage (the posts list) I want to see how many people are participating in this discussion.
Is that possible?
Thnx in advance
If you look at the Codex page for the plugin (http://codex.simple-press.com/.....g-linking/) you will see a template tag that is available called;
spCommentsNumberTag()
Will that do what you want?
YELLOW
SWORDFISH
|
That might be it, but where do i put this for example in the basic twentytwelve? I just tried putting it in the content.php file, but that caused an error and stopped it from displaying anything.
I do not completely understand how and what to put in my template. this?
<?php spCommentsNumberTag('0','Comments','Comment','Comments','1'); ?>
?
you put in your template file where you want the comment count to appear...
but Andy gave you syntax assuming it was going in an html section... if php is already active, you would just enter:
spCommentsNumberTag('0','Comments','Comment','Comments','1');
be sure to copy raw code so you dont get dorked up quotes... same if php is not active and you use Andy's code...
if you get error, please post it here...
Visit Cruise Talk Central and Mr Papa's World
I tried putting it in content.php of the twenty twelve template. in this piece of the file:
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif;
spCommentsNumberTag('0','Comments','Comment','Comments','1');
?>
I get this error:
Fatal error: Call to undefined function spCommentsNumberTag()
argh... sorry, didnt realize that is the wrong function to call... its not publicly available... need to call the wrapper which should be...
spCommentsNumber();
give that a try...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)