Site logo

[Resolved] Comment Count

Home Forums Support [Resolved] Comment Count

Home Forums Support Comment Count

  • This topic has 15 replies, 4 voices, and was last updated 5 years ago by David.
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1711696
    Jatin

    Hi Guys,

    How can i show the Number of comments and last updated date on my blog post as shown in the link in private box.

    Thanks,
    Jatin

    #1712261
    Ying
    Staff
    Customer Support

    Hi Jatin,

    GP Premium 2.0 beta offers a new feature which is dynamic content/image. It needs to be used with Generateblocks as the block editor.

    With this new feature, you’ll be able to customize your post meta.

    In your case, the element type would be the Post meta template.
    https://docs.generatepress.com/article/block-element-post-meta-template/

    Some more videos on how to use this feature:
    https://www.youtube.com/channel/UCoHk-JZFs1N-iI2DQlIKVnA

    Let me know how it works 🙂

    #1712740
    Jatin

    Is it only available in Generateblocks Pro. Cant you advice how to add using GP Premium ?

    #1712762
    Jatin

    I checked this link https://docs.generatepress.com/article/block-element-post-meta-template/ .
    This uses a Comment Icon in SVG Code. How can i get the SVG Icon for Number of comments ?

    #1713024
    Jatin

    Another Question I have apart from SVG Comment Icon. I have built a block using the guide. You can check on my site. It works fine. However, The issue is it introduced a gap between the block element and content start paragraph (as shown in the Screenshot).

    Do you know why this gap has been introduced. I do not want to fix using a CSS as it gets messy in few months time rather than finding why the gap is introduced which can be fixed natively. I hope you understand.

    #1713161
    Jatin

    Ok the last issue has been fixed for the gap. Please ignore it.

    Still want to know about SVG icon HTML code for comment icon on single post.

    #1713207
    David
    Staff
    Customer Support

    Hi there,

    you can use this HTML for the GP comment icon:

    <svg viewBox="0 0 512 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em">
    <path d="M132.838 329.973a435.298 435.298 0 0 0 16.769-9.004c13.363-7.574 26.587-16.142 37.419-25.507 7.544.597 15.27.925 23.098.925 54.905 0 105.634-15.311 143.285-41.28 23.728-16.365 43.115-37.692 54.155-62.645 54.739 22.205 91.498 63.272 91.498 110.286 0 42.186-29.558 79.498-75.09 102.828 23.46 49.216 75.09 101.709 75.09 101.709s-115.837-38.35-154.424-78.46c-9.956 1.12-20.297 1.758-30.793 1.758-88.727 0-162.927-43.071-181.007-100.61z" fill-rule="nonzero"></path>
    <path d="M383.371 132.502c0 70.603-82.961 127.787-185.216 127.787-10.496 0-20.837-.639-30.793-1.757-38.587 40.093-154.424 78.429-154.424 78.429s51.63-52.472 75.09-101.67c-45.532-23.321-75.09-60.619-75.09-102.79C12.938 61.9 95.9 4.716 198.155 4.716 300.41 4.715 383.37 61.9 383.37 132.502z" fill-rule="nonzero"></path>
    </svg>
    #1713660
    Jatin

    Thanks Works fine.

    #1713794
    Jatin

    David – How to find the codes for SVG Icons. Now i need a icon code for Date. To show the last updated date icon next to date. Please help.

    #1713821
    David
    Staff
    Customer Support

    Best thing to do is to grab them from fontawesome:

    https://fontawesome.com/icons?d=gallery&p=2&q=date

    This doc explains how to get the SVG code:

    https://docs.generateblocks.com/article/adding-custom-svg-icons/

    #1713967
    Jatin

    Thanks that worked fine. I have created a Block Element for this for Single post which shows comment etc.
    However, How can i show the same on my archive page. As of now it only shows the date and post author.

    #1714677
    Elvin
    Staff
    Customer Support

    However, How can i show the same on my archive page. As of now it only shows the date and post author.

    If you’re still using Block Template, make sure you add “All Archive” on its display rule location.

    #1714902
    Jatin

    Nothing happened, i added All Archive in the block element. I have also disabled my cache plugin to check.

    #1715058
    David
    Staff
    Customer Support

    In your Display rules you need add a Location: Blog as well as the All Archives

    #1716229
    Jatin

    Thanks it worked.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.