Giter Club home page Giter Club logo

Comments (6)

philiparthurmoore avatar philiparthurmoore commented on June 25, 2024

I'm not sure what you're asking. Do you mean a custom comment form callback function? comments.php houses the code for the comment template and inc/template-tags.php has the function that actually handles the comment form markup (look for _s_comment in that file).

from _s.

mfields avatar mfields commented on June 25, 2024

The comment form is generated by a template tag:

<?php comment_form(); ?>

This function accepts many arguments to modify it's output. There are also a slew of hooks that you can use. Read more about it in the codex: http://codex.wordpress.org/Function_Reference/comment_form

from _s.

lonchbox avatar lonchbox commented on June 25, 2024

Thanx guys, I got the point. Could be nice idea to have the complete response form as a template tag inside of template-tag.php.

from _s.

mfields avatar mfields commented on June 25, 2024

No Problem, glad we could help. Just to clarify, the comment_form() function is used to ensure that themes built from _s will adhere to the guidelines defined by The WordPress Theme Review Team. If you visit http://codex.wordpress.org/Theme_Review#Functionality you will notice that use of comment_form() is required to generate the form that displays under the comment list.

from _s.

philiparthurmoore avatar philiparthurmoore commented on June 25, 2024

Sorry for prematurely closing this. Thanks for adding in your comment, mfields. Didn't want to seem like I was ignoring lonchbox! :)

from _s.

lonchbox avatar lonchbox commented on June 25, 2024

No problem @philiparthurmoore :)

To made my own form I use this code
<?php if(comments_open()) : ?> <?php if(get_option('comment_registration') && !$user_ID) : ?> <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p><?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if($user_ID) : ?> <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p> <?php else : ?> <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" /> <label for="author"><small>Name <?php if($req) echo "(required)"; ?></small></label></p> <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /> <label for="email"><small>Mail (will not be published) <?php if($req) echo "(required)"; ?></small></label></p> <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /> <label for="url"><small>Website</small></label></p> <?php endif; ?> <p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p> <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p> <?php do_action('comment_form', $post->ID); ?> </form> <?php endif; ?> <?php else : ?> <p>The comments are closed.</p> <?php endif; ?>
It´s Correct?, why is not inside of the template tag? In my case I wan´t to add new fields and change the design using new classes on the html not only the css.

from _s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.