Sign in

How to add a tag to a post?

  • This topic has 6 replies, 2 voices, and was last updated 1 month, 1 week ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7663
    hhtmp88

    Dear all,

    I am new to Publii and have just installed it in my Win10 PC.

    I have created some tags, e.g. tag1, tag2, tag3

    I wonder how to add a tag to my newly created post?

    Thanks for any kinds of help!

    #7664
    Bob

    While editing a post, click the gear icon in the upper right corner. Then you will see all the post options including tags.

    screenshot-2022-06-29-at-07.41.54

    --
    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!

    #7667
    hhtmp88

    Oh!
    Thanks Bob for your comment!

    #7668
    hhtmp88

    Dear Bob,

    If I want to list all posts with the same tag, say “tag1”, in a post, how to do?

    Thanks!

    #7669
    Bob

    Look at this:  https://getpublii.com/dev/create-post-list-from-specific-tags/

    --
    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!

    #7670
    hhtmp88

    Dear Bob,

    It looks quite complicated to me as I am not a coder.
    However, I will try my best to make it.

    with reference to:
    https://getpublii.com/dev/create-post-list-from-specific-tags/

    I am using the “taste” theme:
    (a) I have checked that “createContentStructure” has been enable by default ( “createContentStructure”: true, )
    in the config.json file:

    C:\Users\user1\OneDrive\Documents\Publii\themes\taste\config.json

     

    (b) Then, in the “taste” theme folder, I have created the helpers.js file (it does not exists in the theme folder) with the code as specified:

    C:\Users\user1\OneDrive\Documents\Publii\themes\taste\helpers.js

     

    (c) Edit the post.habs file:

    C:\Users\user1\OneDrive\Documents\Publii\themes\taste\post.habs

    -> In line 80, I find the code  {{{text}}}   and change it to   {{{parseShortcode text}}}

    (d) Finally I created a post with name “SSP”, add it to a sub-menu, but it is what it is, pls. see the screen capture attached:
    create-a-post-list-from-a-specific-tag

    What’s wrong?

    #7673
    Bob

    You are in the wrong location. Apply the changes here: 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 fileshttps://getpublii.com/dev/theme-overrides/

    --
    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!

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