Sign in

Remove date from related posts and change “Related posts”

  • This topic has 8 replies, 3 voices, and was last updated 8 months, 2 weeks ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6776
    Avatar photoTheIML

    I am using Mercury 2.2 and I’ve managed to scrub most of the dates. However they are still appearing under “Related posts”. Is there a way to remove the dates here?

    Also can I change the wording across the site from “Related Posts” to say “Related Items”

     

    #6777
    Avatar photoBob

    Is there a way to remove the dates here?

    You should edit the Related Posts section in the post.hbs file ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME) 
    To preserve your custom code and prevent it being overwritten the next time the theme is updated, please ensure that you have created override files; these are, essentially, copies of the existing theme files that are stored separately from the main theme files → https://getpublii.com/dev/theme-overrides/

    Also can I change the wording across the site from “Related Posts” to say “Related Items”

    Edit the language file, more about it you can read in the user documentation https://getpublii.com/docs/translate-publii-theme-to-another-language.html

     

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6778
    Avatar photoTheIML

    Thanks for that. After changing the language file, the “Related Posts” at the bottom of each post/page didn’t change. I guess the wording is being pulled from somewhere else.

    This is what I changed but there was no difference

    “post”: {
    “publishedBy”: “By”,
    “publishedOn”: “Published on”,
    “lastUpdatedDate”: “This article was updated on”,
    “previousPost”: “Previous Item”,
    “nextPost”: “Next Items”,
    “relatedPosts”: “Related items”,
    “comments”: “Comments”
    },

    “tags”: {
    “tagsPageTitle”: “Categories”,
    “description”: “All Categories”,
    “post”: {
    “1”: “Item”,
    “default”: “Items”
    }

    #6779
    Avatar photoBob

    This is what I changed but there was no difference

    It has to work, save the theme settings or restart the app.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6780
    Avatar photoTheIML

    I double-checked everything. The json file as described. Restarted Publii when it didn’t work. Then I posted here. Then I checked the json file again and restarted Publii. No change.

    Add it looks like this at the bottom of every page

     

    #6782
    Avatar photoBob

    what is the location of the edited language file?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6783
    Avatar photoTheIML

    Where the documentation said to edit it – in the Mercury themes file as pictured. You can see it is also the only file that has been changed in that folder.

     

    #6785
    Avatar photoBob

    This is the wrong location. The themes directory is used to store theme files which are then applied to user sites.
    You have to edit the language file in your site location ‎⁨(Documents ▸ ⁨Publii⁩ ▸ ⁨sites⁩ ▸ ⁨YOUR_SITE ▸ ⁨input⁩ ▸ ⁨themes⁩ ▸ ⁨YOUR_THEME)

    To preserve your custom phrases and prevent it being overwritten the next time the theme is updated, please ensure that you have created an override language file; these are, essentially, copies of the existing theme files that are stored separately from the main theme fileshttps://getpublii.com/docs/translate-publii-theme-to-another-language.html#overridinglanguagefile

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6786
    Avatar photoshaun2k

    Is there a way to remove the dates here?

    If you preferred not to edit the post.hbs file, you could try hiding the dates by adding this to “Custom CSS”:

    .post__related time {
        display: none;
    }
    

     

     

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