WordPress.org

Ready to get started?Download WordPress

Forums

Popup comments (12 posts)

  1. PedroMorais
    Member
    Posted 1 year ago #

    Good evening, I needed help in the following.

    I do not want to make comments and comment box at the bottom and go on to have a "button" that when loading, would open a page (style pop-up) in there that people wrote the comment and had access to comments correspondestes to post.

    Someone can help me?

    Thank you,
    Pedro Lopes

  2. bcworkz
    Member
    Posted 1 year ago #

    WordPress has native support for pop-up comments. Use comments_popup_link() inside the loop of your home template and comments_popup_script() in your header template. I don't use this, so this is pretty much all I know about it.

  3. PedroMorais
    Member
    Posted 1 year ago #

    Thanks bcworkz

    I know wordpress support pop-up comments, but I wanted how make this..
    I don't wanted the traditional comments style, but yes the pop-up comments.
    How I have a button to put on the post, to open pop-up comments?

  4. bcworkz
    Member
    Posted 1 year ago #

    The exact procedure is theme dependent, hopefully you can figure it out based on what I give you here. Most important is on your header.php template. Find the call to wp_head();, which should be just above or fairly close to the </head> tag. Place the line comments_popup_script(); right above it. Ensure it is inside a <?php ?> tag block.

    Some themes already have the comments_popup_link(); code on the content.php template, which is the template used to show the listing of all your posts on your main page. Without the header code, the comments on the single post page is linked to instead. So this part may work without doing anything.

    If it's not there, you can add it pretty much where ever you want, the whole template should be inside the "loop". Just be sure it's inside a<?php ?> tag block.

    You'll probably want another link on the single post page, so put the comments_popup_link(); code on single.php as well. On this template, the code must be inside the loop, which should look something like this:

    <?php while ( have_posts() ) : the_post(); ?>
    <!-- more html code usually goes here -->
    <?php endwhile;>

    As long as the inserted code is between the while and endwhile and in a <?php ?> tag block, you'll be good to go.

    This code will throw warnings unless your theme has a comments-popup.php template. It's no longer part of the WordPress distribution. If you do not have one, you can get one from an older WordPress version from the downloads archive. I'm not sure when it was removed, but most or all of version 2.* should have it in the default theme.

  5. PedroMorais
    Member
    Posted 1 year ago #

    Thanks bcworkz,

    I can not do that, if I give you my website to further explain and give you access, can you help me?

    And once again, many thanks for the help

  6. bcworkz
    Member
    Posted 1 year ago #

    I'm sorry, but I cannot accept offers to directly alter your website, I don't wish to be blamed should anything go wrong. In general, you shouldn't grant access so easily to total strangers either. I do understand your frustration of not being able to do these things yourself, and I will try to help you within limits.

    The other problem is even when you get the popup functionality, there will be a fair amount of tweaking CSS directives to get everything to look right in your theme, the default look is rather crude.

    Are you able to customize CSS files yourself? If not, you really need to find someone who can do these things and be willing to pay for it. This will not be me, I am not soliciting work.

    If you can do CSS work and only the PHP is your limitation, I would be able to suggest where to make the PHP related changes, but you would need to make the actual changes and assume all responsibility if things do not work. Be sure you have clean backups of all files that are changed.

    You will need to post the relevant portions of the template files I mentioned somewhere such as pastebin.com and provide links to them here. You should also consider making a child theme for your changes otherwise you will lose your changes when your theme is updated. Can you manage that? It really just involves creating a simple text file and placing it in a new folder on your server.

  7. PedroMorais
    Member
    Posted 1 year ago #

    Hi bcworkz,

    I say that because it's more simply and more quickly for us.
    But if you can help me, I can do it with your help.

    And we talk here or email or chat? (Exemple: facebook chat or skype)
    In chat (skype or facebook) it's more quickly, because us talking live.

    It's possible?

    And once again, many thanks for the help

  8. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    This is a community support forum. All support happens here - not in email, facebook or skype.

  9. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    You should be able to communicate and resolve issues through WordPress.org forums. If you need to communicate more frequently, I suggest using a service like Collaedit http://collabedit.com/ . With that service, you needn't exchange personal contact information.

  10. PedroMorais
    Member
    Posted 1 year ago #

    esmi,

    Sorry for that. The support it's happen here.

  11. PedroMorais
    Member
    Posted 1 year ago #

    bcworkz,

    I have 2 wordpress site, the official and the tester.

    We can make all tests on my wordpress site test, and in that wordpress site test, don't have problem if anything go wrong.

    Like this way?

  12. PedroMorais
    Member
    Posted 1 year ago #

    bcworkz,

    So you can help me?

    Thks

Topic Closed

This topic has been closed to new replies.

About this Topic