Tagged: x
-
AuthorPosts
-
June 13, 2016 at 6:20 pm #1040462
calebcrainParticipantHi,
I just purchased and installed your X theme today, and all is going fairly well with the customization, but I’ve run into a snag. Under “Settings–>Discussion,” when I check the box to “Automatically close comments on articles older than 14 days,” the old comments don’t display. When I uncheck this box, the old comments re-appear, but so does an invitation to add a new comment, which I don’t want to extend. I know it’s possible for WordPress to display old comments even after comments have been closed, because my blog was doing so before I installed the X theme. I searched your forum here, and I found a response suggesting that the only way to do this with X is to make a child theme and edit the CSS. Please tell me that’s not so! I purchased this theme in order to *avoid* having to do exactly that. The question was asked and answered two years ago, and this seems like pretty basic functionality, so I’m hoping you’ll tell me that you’ve figured out a way to do this more easily by now.
all best,
CalebJune 14, 2016 at 3:34 am #1040999
Paul RModeratorHi Caleb,
Thanks for writing in!
I tried this with wordpress twenty sixteen theme and it’s doing the same thing.
Xtheme uses wordpress standard comments functionality and it’s not in anyway being altered by the theme.
June 14, 2016 at 2:59 pm #1041999
calebcrainParticipantWell, that’s too bad about the twenty-sixteen theme, but it doesn’t happen with all WordPress themes. I take it from your response that there’s no way to fix this with X other than a child theme.
June 15, 2016 at 1:55 am #1042770
Paul RModeratorHi Caleb,
Can you specify which theme so we can test and take a closer look.
Thanks
June 22, 2016 at 7:47 am #1054226
calebcrainParticipantOld comments are displayed even on posts where comments have been closed on the twenty-fifteen theme, for example.
June 22, 2016 at 10:09 am #1054459
LelyModeratorHi There,
Thank you for the clarification.
I did check and I can confirm that we do display comments only when it is open for a new one.
This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!Unfortunately, as of now, we need to update some files using a child theme to display existing comments even if the post is already close for new comments.
Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Then copy the _comments-template.php file from wp-content\themes\x\framework\views\global to wp-content\themes\x-child\framework\views\global. Open the copied file and replace the code with the following:
<?php // ============================================================================= // VIEWS/GLOBAL/_COMMENTS-TEMPLATE.PHP // ----------------------------------------------------------------------------- // Comments output for pages, posts, and portfolio items. // ============================================================================= $stack = x_get_stack(); $container_begin = ( $stack == 'icon' ) ? '<div class="x-container max width">' : ''; $container_end = ( $stack == 'icon' ) ? '</div>' : ''; ?> <?php if ( comments_open() || get_comments_number()) : ?> <?php echo $container_begin; ?> <?php comments_template( '', true ); ?> <?php echo $container_end; ?> <?php endif; ?>Copy also wp-comments.php file from wp-content\themes\x\framework\views\[stack] to wp-content\themes\x-child\framework\views\[stack]. Open the copied file and replace the code with the following:
Open the file and then check for the following block of code at the end :
<?php comment_form( array( 'comment_notes_after' => '', 'id_submit' => 'entry-comment-submit', 'label_submit' => __( 'Submit' , '__x__' ) ) ); ?>Update that code to this:
<?php if ( comments_open()) : comment_form( array( 'comment_notes_after' => '', 'id_submit' => 'entry-comment-submit', 'label_submit' => __( 'Submit' , '__x__' ) ) ); endif; ?>Hope this helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1040462 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
