How to display posts in this particular way?
-
I’m redesigning my website without
single.php
, so that posts can only be seen whether on the frontpage or in archives. Nonetheless, I’d like to force permalinks to display corresponding posts on my frontpage. To do so, the mechanism would be something like:- If
$_SERVER['REQUEST_URI']
matches any post slug/permalink, get the corresponding post and its meta. If no match is found, show last post by default (as seen now); - According to the post’s category, display it in its proper category column within the Journal section;
- Name that category column the post slug/permalink
id
; - Redirect user to
joaoramos.org/#id_used_above
, so that the browsers scrolls down to the article; - Highlight the article so that the user knows which exactly is the article to consume.
Does this process make any sense? Is it possible to actually perform the verification in step 1 (if so, how)? Are there any other ways of loading the matching post inside the frontpage this way, without using
single.php
? - If
- The topic ‘How to display posts in this particular way?’ is closed to new replies.