bethany138
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Comments going to wrong post. Post id reset?Sorry about that.
I figured it out and I just thought I would post back here and let you know what I did in case someone has a similar problem.
I needed to create a conditional element ?? in order to pull the post id into the css id. Or something. It worked.
This is the code.
The link to the form:
<?php if ( is_home() ) : ?> <span class="commentslink">Comment <a class="commentspop" href="#commentsform-<?php the_ID(); ?>">on this post</a></span> <?php else : ?> <span class="commentslink">Comment <a class="commentspop" href="#commentsform">on this post</a></span> <?php endif; ?>The beginning of the form code:
<div style="display: none;"> <?php if ( is_home() ) : ?> <div id="commentsform-<?php the_ID(); ?>" class="commentsformhome"> <?php else : ?> <div id="commentsform"> <?php endif; ?>Forum: Fixing WordPress
In reply to: comments form in pop-up window (instead of blog post)Did fancybox work out for you? I have been trying to implement it in the same way and when used on the index page it sends the comment to the latest post instead of the correct post. Any ideas?
Forum: Themes and Templates
In reply to: problem with comment formDon’t know if you figured it out but try this.
Replace this line:
<input type="hidden" name="comment_post_ID" value="<?php echo $ID;?>" />with this:
<input type="hidden" name="comment_post_ID" value="<?php the_ID(); ?>" />Forum: Fixing WordPress
In reply to: Comments going to wrong post. Post id reset?I guess the php would help. : )
[Code moderated as per the Forum Rules. Please use the pastebin]