Tagged: x
-
AuthorPosts
-
April 25, 2016 at 9:15 am #898661
cleflerParticipantIs there a way to pass the number of comments for a given page to one of the number counter elements?
I was led below for where the comment code is but don’t know how to get a counter to reference the number of comments for a specific page.
https://community.theme.co/forums/topic/display-post-view-count-with-icon-in-meta/April 25, 2016 at 10:17 pm #899627
LelyModeratorHello There,
Thanks for posting in.
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 add the following code on your child theme functions.php file:
function custom_comment_counter(){ echo do_shortcode('[counter num_start="0" num_end="'.get_comments_number().'" num_speed="1500" num_color="#272727" text_below="Counters"]'); } add_shortcode('custom_counter_shortcode', 'custom_comment_counter');To display the counter with number of comments, please add the following shortcode inside a RAW content element:
[custom_counter_shortcode]Hope this helps.
April 26, 2016 at 2:34 pm #900865
cleflerParticipantGreat!
Is there a way to display the comments from one page in the counter located on a separate page?April 27, 2016 at 5:47 am #901865
RupokMemberHi there,
Thanks for updating. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-898661 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
