• Resolved webcomm

    (@webcomm)


    I am using the site editor and want to add a simple “view comments” link to the bottom of each post in the Blog Home template. I had no trouble adding a #comments anchor to the comments section in the Single Posts template, but how do I display a link to that permalink and anchor in the Blog Home template?

    I want to achieve something like…

    <a href="/my-post-permalink#comments">View comments</a>

    • This topic was modified 1 month ago by webcomm.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter webcomm

    (@webcomm)

    I decided to stop using the Site Editor and instead used https://underscores.me to generate a starter theme. It’s dramatically easier for me to customize the resulting starter theme in code, compared with using the Site Editor GUI.

    Jayson

    (@jaygumanid)

    Hello @webcomm curious, what theme did you initially used?

    Thread Starter webcomm

    (@webcomm)

    Twenty Twenty-Five

    To add a “View Comments” link to each post in your Blog Home template, you need to dynamically generate the post’s permalink and append the #comments anchor. The method depends on your CMS or site editor.For WordPress (Full Site Editing – FSE)

    If you’re using WordPress with the Site Editor (FSE), you can modify your Blog Home template by adding this inside the loop where posts are displayed:

    html

    CopyEdit

    <a href="<?php the_permalink(); ?>#comments">View comments</a>

    This ensures the link dynamically points to each post’s comment section.For Custom HTML Templates

    If you’re working with a custom HTML-based blog, you need to manually set the post permalink like this:

    html

    CopyEdit

    <a href="/my-post-permalink#comments">View comments</a>

    Just replace /my-post-permalink with your actual post URL dynamically, depending on your CMS.

    I came across this issue while optimizing a project, similar to how Supreme Security Services focuses on implementing secure and well-structured website solutions. Hope this helps!

    • This reply was modified 2 weeks, 3 days ago by johanpits12.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.