Tagged: x
-
AuthorPosts
-
October 1, 2016 at 10:13 pm #1198991
BradenParticipantI am attempting to place a Leave a reply/comment box on a specific page. It appears that enabling comments on a page does not actually do that. I found this…
add_action('x_before_the_content_end','page_comment'); function page_comment() { if ( comments_open() ) : ?> <?php echo $container_begin; ?> <?php comments_template( '', true ); ?> <?php echo $container_end; ?> <?php endif; }I have added this code to the child themes functions.php and it does work, the only problem is that it spans the entire width of the page and does not conform to the layout. Is it possible to create a new section and embed the code within it or somehow format it to conform with the layout? Any help would be appreciated. Thanks!
October 2, 2016 at 2:30 am #1199074
Rue NelModeratorHello There,
Thanks for writing in! To resolve your issue, please modify your code and use this instead:
add_action('x_before_the_content_end','page_comment'); function page_comment() { if ( comments_open() ) : ?> <div class="x-section"> <div class="x-container max width"> <?php echo $container_begin; ?> <?php comments_template( '', true ); ?> <?php echo $container_end; ?> </div> </div> <?php endif; }Please let us know if this works out for you.
October 2, 2016 at 8:18 am #1199275
BradenParticipantBeautiful! Thank you so much, worked perfectly!
October 2, 2016 at 8:45 am #1199293
ThaiModeratorGlad it worked 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1198991 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
