Tagged: x
-
AuthorPosts
-
May 3, 2016 at 2:53 pm #911353
MaartenParticipantHi staff,
How can I turn on comments for each blog post?
I have searched this forum and have tried several configuration of the functions.php….but cant get it to work 🙁
Thanks already for a reply
regards Maarten
May 3, 2016 at 2:55 pm #911364
MaartenParticipantThis reply has been marked as private.May 4, 2016 at 12:14 am #911910
Nabeel AModeratorHi there,
Thanks for writing in! Please refer to this guide https://en.support.wordpress.com/enable-disable-comments-for-future-posts-pages/
Hope this helps!
May 4, 2016 at 7:24 am #912352
MaartenParticipantHi
Thanks.
I had already looked into that page and those settings are already correct 🙂
What happens is that when I turn the “allow comments” ON in Cornerstone-General-Settings for a single post and SAVE….the setting is back to OFF after reloading te page.
I want to allow comments for each single POST.
Searching the forum I did find many solutions via functions.php…but none seemed to work for me:(
Thanks already for a reply
regards Maarten
May 4, 2016 at 10:19 am #912625
JoaoModeratorHi there,
Please go to your WP-Admin and click on Posts / All Posts and you can select allow comment to each post.
Please see image attached.
Hope that helps,
Joao
May 5, 2016 at 5:28 am #914075
MaartenParticipantHi Staff,
Thanks…that did help 🙂 Now the “allow comments” in the cornerstone settings of the post also stay ON after saving!
The comments section layout was terrible though…
I managed to change a lot myself in the customizer.
One thing I can’t get right:
I want my 1 column pages like my blog post to have a maximum width. So they stay readable even for people who prefer to use wide screens. I do this with adding a style line on the row element:
margin: 0px auto; float: none; max-width: 750px; display: block;I want the column section to be in the same column container and to have the same responsive character so I added this to the customizer:
.x-comments-area { max-width: 750px; margin-left: auto; margin-right: auto; font-family: 'Helvetica'; }This works…until a screen becomes too small. Then the comment section is spread 100% width with NO margin left and right. (see screenshot)
So my questions are:
- Is my style solution on the row element the best way to go? Or can I put this somehow in the customizer global css so that it is set for all the future posts as well?
- How can I change this css so that in smaller screens the comments area use the SAME margin left and right like the column container of the post text?
- How can I turn the input for website OFF
- How can I put the name and email input field horizontally next to each other for the bigger screen formats (on mobile device on two rows like now)?
- how can I turn the email required setting OFF?
Thanks for a reply
May 5, 2016 at 11:27 am #914512
RadModeratorHi there,
1. Yes, it should be at global CSS, else, it will only affect current post.
2. Please change it to this,
.x-comments-area { max-width: 750px; width: 90%; margin-left: auto; margin-right: auto; font-family: 'Helvetica'; }It will have 5% margin on both side for device smaller that 750px, you can change that if you wish 🙂
3. Please check this https://wordpress.org/support/topic/remove-website-url-option-from-comments, please add the code to your child theme’s functions.php
4. Please add this CSS as well,
@media ( min-width: 980px ) { .comment-form-author { width: 49%; float: left; } .comment-form-email { width: 49%; float: right; } }5. It can’t be, email is a unique identification of an author including comments.
Thanks!
May 6, 2016 at 10:21 am #978688
MaartenParticipantHi Staff,
thanks again.
1,2,4 and 5 are resolved.
For 3 I have tried this type of code in the functions.php of my child theme. I did find similar coding in many different problem solving articles:
add_filter('comment_form_default_fields', 'remove_url'); function remove_url($fields) { if(isset($fields['url'])) unset($fields['url']); return $fields; }But it does not work 🙁 Even after deleting all cache etc…
What does work is to add in global css:
.comment-form-url { display:none; }Although I think the url field is only hidden now and I find many people complaining about bots targetting this url field…which is probably still possible with this solution 🙁
Any suggestions to solve issue 3 in a more neat way?
Another question is: that sometimes when editing my site the “allow comments” ON still turns randomly to OFF…very weird…without having changed anything on that setting myself.
Is there any solution in the functions.php or global css that fixes the setting for allow comments (for posts) to ON permanently? I really dont understand why this setting gets an override now and then…?!?
Thanks already.
May 6, 2016 at 5:49 pm #979427
RadModeratorHi there,
Would you mind providing your FTP login credentials as well? That’s the only way for us to check it 🙂
Thanks!
May 7, 2016 at 4:03 am #979966
MaartenParticipantThis reply has been marked as private.May 7, 2016 at 8:47 am #980167
ChristopherModeratorHi there,
#1 Please update your code in functions.php file to :
function crunchify_disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','crunchify_disable_comment_url');#2 You have only one published post, which doesn’t allow for comments since you didn’t check the box ‘allow comments’ under ‘Discussion’ box, see the attachment.
Hope it helps.
May 8, 2016 at 2:23 pm #981255
MaartenParticipantHi Christopher,
thanks for the reply.
Unfortunately it does not work…the url is still visible 🙁
I know that I have to select the allow comments box…and I have done so…the weird thing is sometimes the check dissapears without me changing it…therefore I have to check it again…Maybe this happens because I am updating the general layout of single post untill I have the right one. That is when I will start publishing.
But if there is no way to fix this checkbox on more permanent I will see how it works when I only start posting…Hopefully it will stay on then all the time.
I hope you have another solution for the url!
Thanks already
regards
May 8, 2016 at 10:17 pm #981635
Rue NelModeratorHello There,
Are you using Ethos stack? If that’s the case, please follow the following steps.
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file<?php // ============================================================================= // VIEWS/ETHOS/WP-COMMENTS.PHP // ----------------------------------------------------------------------------- // The area of the page that contains both current comments and the comment // form. The actual display of comments is handled by a callback to // x_comment(). // ============================================================================= $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $asterisk = ( $req ? '*' : '' ); $asterisk_html = ( $req ? '<span class="required">*</span>' : '' ); $aria_req = ( $req ? " aria-required='true' required='required'" : '' ); ?> <?php // // 1. If the current post is protected by a password and the visitor has not // yet entered the password, we will return early without loading the // comments. // if ( post_password_required() ) return; // 1 ?> <div id="comments" class="x-comments-area"> <?php if ( have_comments() ) : ?> <h2 class="h-comments-title"><span><?php _e( 'Comments' , '__x__' ); ?></span></h2> <ol class="x-comments-list"> <?php wp_list_comments( array( 'callback' => 'x_ethos_comment', 'style' => 'ol' ) ); ?> </ol> <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <nav id="comment-nav-below" class="navigation" role="navigation"> <h1 class="visually-hidden"><?php _e( 'Comment navigation', '__x__' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', '__x__' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', '__x__' ) ); ?></div> </nav> <?php endif; ?> <?php if ( ! comments_open() && get_comments_number() ) : ?> <p class="nocomments"><?php _e( 'Comments are closed.' , '__x__' ); ?></p> <?php endif; ?> <?php endif; ?> <?php comment_form( array( 'comment_notes_before' => '', 'comment_notes_after' => '', 'id_submit' => 'entry-comment-submit', 'label_submit' => __( 'Submit' , '__x__' ), 'title_reply' => __( '<span>Leave a Comment</span>' , '__x__' ), 'fields' => array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', '__x__' ) . ' ' . $asterisk_html . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" placeholder="' . __( 'Your Name', '__x__' ) . ' ' . $asterisk . '" size="30"' . $aria_req . ' />' . '</p>', 'email' => '<p class="comment-form-email">' . '<label for="email">' . __( 'Email', '__x__' ) . ' ' . $asterisk_html . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" placeholder="' . __( 'Your Email', '__x__' ) . ' ' . $asterisk . '" size="30"' . $aria_req . ' />' . '</p>', 'url' => '' ), 'comment_field' => '<p class="comment-form-comment">' . '<label for="comment">' . _x( 'Comment', 'noun', '__x__' ) . '</label>' . '<textarea id="comment" name="comment" cols="45" rows="8" placeholder="' . _x( 'Your Comment *', 'noun', '__x__' ) . '"' . $aria_req . '></textarea>' . '</p>' ) ); ?> </div>3] Save the file named as
wp-comments.php
4] Upload this file to your server in the child theme’s folder
wp-content/themes/x-child/framework/views/ethos/Please let us know how it goes.
May 10, 2016 at 7:58 am #984012
MaartenParticipantHi Staff,
Yes I use Ethos child theme.
I have tried it but get an error:
Parse error: syntax error, unexpected ‘php’ (T_STRING) in /home/mindfuel/public_html/wp-content/themes/x-child/framework/views/ethos/wp-comments.php on line 10
I have tried to debug the file but unfortunately the bug level is above my programming pay grade…If you need personal coaching…I am your man 😉
Luckily I know the wizard of Oz support team 🙂
Thanks already
May 10, 2016 at 12:43 pm #984474
DarshanaModeratorThis reply has been marked as private. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-911353 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
