Comments (6)
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.
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.
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.
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.
Sorry for prematurely closing this. Thanks for adding in your comment, mfields. Didn't want to seem like I was ignoring lonchbox! :)
from _s.
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 »</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)
- Description tab content being forced into any tab content on single product template
- ERRORS out of the BOX! WP 5.9.3
- Is underscores still valid? HOT 4
- What is the use of these hidden 8 svgs above the _S themes and where is it created? HOT 2
- Background Image always scrolls on iOS
- Right Sidebar Position
- Thumbnail not rendering HOT 1
- please add tailwind inside saas HOT 2
- Changing Page Title Tags from H2 to H1 - Please Help!
- the_content doesn't work for displaying single posts
- Help ME PLEASE! HOT 17
- Parent Link not clickable to the link in HOT 1
- Deprecated npm packages HOT 4
- creating unnecessary paddings with Elementor
- Custom Fonts Not Loading Safari Browser
- PHPCS not using version number specified by testVersion
- mixin for column-width deprecated in SASS 2.0
- Gutenberg Editor CSS Problems HOT 1
- Fatal error: Uncaught Error: Attempt to assign property "transport" with PHP 8.1.9
- Is this theme dead, Can I still use it as starter template? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from _s.