• I’ve successfully implemented WP into my current site and thanks to the following code have it displaying the top three posts. I’m wondering how I go about getting the comments section to work in a pop up window? Currently if someone clicks on comments when I add:
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    then it just reloads the page with a slightly different extenstion:
    https://tylerparrott.com/blog/?p=9#respond instead of https://tylerparrott.com/blog

    Any help would be appreciated. I’d like the ability to have people click on the comment link, have a pop-up come that allows them to see all comments and add to that list if they wish to (the addition should be in the same window).

    <!-- Get the last 3 posts. -->
    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <strong>
    <?php the_title(); ?>
    </strong>
    
    <?php the_date(); ?>
    
    <?php the_content(); ?>
    
    <div id="line"></div>
    <?php endwhile;?>

    Thanks,
    Tyler

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter p8ball4life

    (@p8ball4life)

    Here’s a simplified version of the question without the fluff.

    How do I display comments for a particular post?

    How do I add the field for users to make and post comments.

    Is my code to display and link to the comments section incorrect?
    If not, then why is it only reloading the page with a different extension?

    Thread Starter p8ball4life

    (@p8ball4life)

    Any help would be appreciated.

    Thread Starter p8ball4life

    (@p8ball4life)

    Am I asking the question wrong, offending someone, or not finding something obvious?

    Thread Starter p8ball4life

    (@p8ball4life)

    Help please. Here is my current code. Same problem.

    <?php comments_popup_script(300, 400); ?>
    </head>
    <?php include '../includes/header.inc' ?>
    
          <div id="txt">
            <p>
    
    <!-- Get the last 3 posts. -->
    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <strong>
    <?php the_title(); ?>
    </strong>
    <br />
    <?php the_date(); ?>
    
    <?php the_content(); ?>
    <br />
    
    <!-- <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?> -->
    <a href="<?php the_permalink(); ?>#comments"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a>
    <div id="line"></div>
    <?php endwhile;?>
    <!-- End get last 3 posts. -->
            </p>
          </div>
    <?php include '../includes/footer.inc' ?>
    compassionateconsiderations

    (@compassionateconsiderations)

    I am also waiting for anyone to respond.

    Thanks

    Thread Starter p8ball4life

    (@p8ball4life)

    I still have not resolved this issue. Any help would be appreciated.

    Thread Starter p8ball4life

    (@p8ball4life)

    Any help would be appreciated, I have the time to try and fix this now and the issue is still unresolved.

    Thread Starter p8ball4life

    (@p8ball4life)

    After searching for a bit, I believe that the installation isn’t properly finding the comments.php file. I’m not using any theme, so do I need to copy over that file to a certain directory?

    Thread Starter p8ball4life

    (@p8ball4life)

    Is my topic in the wrong section? No one seems to be responding.

    Hello,
    I may have the beginning of an answer.

    I have the same problem. When I click on the comments ling, it does not work. It just loads another page with no comments.

    I started yesterday with WP and jumped right in designing my own templates. I am following the good advices of Tessa Blakeley Silver in WordPres Theme Design.

    She suggests that we change the name of the single.php page. I read somewhere else in the forum that the problem might be coming from the single.php page. So I gave it it’s original name and Voila! the comments are now functionning. The template for it is not working properly but the comments form is available.

    Hope this helps.

    Julie

    Even better. This is what you want.

    <div id="pagecomments">
    <?php comments_template(); ?>
    </div>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
    <small class="date"><?php the_time('F jS, Y') ?></small>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark"
    title="Permanent Link to <?php the_title(); ?>"><?php
    the_title(); ?></a></h2>
    <small>Posted by <?php the_author() ?> <!----></small>
    <div class="entry">
    <?php the_content('<br />Read the rest of this entry &raquo;'); ?>
    </div>
    <div id="pagecomments">
    <?php comments_template(); ?>
    </div>
    <p class="postmetadata"><!--Posted in <?php the_category(', ')
    ?> |--> <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments', '1 Comment', '[%] Comments'); ?></p>
    </div>
    <?php endwhile; ?>
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Adding comments to a popup window.’ is closed to new replies.