Forums

Calling Single.php on Homepage (3 posts)

  1. Shifty88
    Member
    Posted 3 years ago #

    I'm not exactly sure how to describe what I'm after, but I can tell you what I am hoping to do:

    What I'm trying to put in place is a way to have each post styled independently. So right now I've got ways to call a different style.css and a different single.php for each post I make.

    The last thing I need to do is get the latest post to show up on my homepage with the same style.css and single.php template. Right now, I can style my single.php page for that particular post, but when that post is on the homepage it styles itself according to how the index.php page is layed out. That is not what I'm looking for.

    I can't figure out how to, if it exists, call a post-specific index page.

    Any help would be greatly appreciated.

    Thank you.

  2. mikejandreau
    Member
    Posted 3 years ago #

    I'm fairly certain you can't do what you want to do.

    To clarify, you want all the posts on your index.php to be styled differently? Correct?

    If that's the case, you can't do that.

    By default, WordPress assumes that all the posts on the same theme page, are going to be styled the same. There's no (easy) way to override that functionality, and include different stylings for different posts, on the same page.

  3. Shifty88
    Member
    Posted 3 years ago #

    Well the thing is, I only have 1 post on my homepage at one time.

    I've set it up so that each time you view an article (via single.php) will have its own template file. But instead of having to manually copy the code from that post-specific single.php to index.php (each time I post something new) I was wondering if there was an more automated way for it to be done.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.