Support » Fixing WordPress » 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:

    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, 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?

  • The topic ‘How to display posts in this particular way?’ is closed to new replies.