How to create a post template which fetches posts by tag #1465
-
Hi, My question is: how I make the 'page' to be shown on the front page within the list of posts ? Secondly: My goal is to create a 'page' that holds links to other posts, e.g.:
and this 'page' should behave like the front page ... I use the Mercury free theme |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
Hi @3muchfun! I admit, I'm a little confused by this post, but hopefully this answer helps...
Don't mark the post as hidden.1
It's possible to set an existing post/page1 as your site's home page. Instead of a listing of posts, it'll display your selected post. That said, if you want to keep Publii's automated "Latest posts" listings and have some kind of opening text above it that displays other links, use the WYSIWYG text editor in the "Hero section" theme setting: You can then link to other pages from there using the link button. Let me know if that clarifies things. If not, could you sketch out what you're hoping to achieve? 1 For the time being, "posts" and "pages" (in this context) are more or less the same. Hiding a post doesn't change/convert it into a page -- it just hides the posts from listings. |
Beta Was this translation helpful? Give feedback.
-
I would create a post. Then create a post template and assign it to this post. Then make Publii display this post as the main page. Now I would edit the template to show cards to the other posts. I don't know if this is the solution you are looking for, but I think it's kind of close. You can see this implemented at my website's lamardeswing.com frontpage. |
Beta Was this translation helpful? Give feedback.
This might be the line to modify:
I did some digging, and you might have to use a different helper since you're no longer on the home page index. Give this article a look: https://getpublii.com/dev/how-to-display-posts-connected-with-a-specific-tag-name/
Sidenote: to properly format codeblocks in GitHub, use
```
at the top and bottom of the code. You can even specify the code language for highlighting in the top```
For example: