How to display posts in this particular way? (1 post)

  1. joaoramos
    Posted 4 years ago #

    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:

    1. 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);
    2. According to the post's category, display it in its proper category column within the Journal section;
    3. Name that category column the post slug/permalink id;
    4. Redirect user to joaoramos.org/#id_used_above, so that the browsers scrolls down to the article;
    5. 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?

Topic Closed

This topic has been closed to new replies.

About this Topic