WordPress.org

Support

Support » Themes and Templates » [Resolved] Per post CSS for blog with multiple authors?

[Resolved] Per post CSS for blog with multiple authors?

  • Hi all!

    I’d like to use different stylesheets for each post on a blog with multiple authors, so I can basically “skin” each post on the main page (single posts also) with each author’s “colors”.

    So for example, if I have two authors – lets call them yellow guy and blue girl – I want all yellow guys’ posts on the main page appear yellowish and all blue girl’s blueish.

    Is it possible to have different posts on the homepage each obey its own stylesheet, depending on some kind of author variable?

    Any help would be greatly appreciated. This is new territory for me and I haven’t exactly got the PHP skillz of a genius 😉

    Looking forward to your replies!

Viewing 9 replies - 1 through 9 (of 9 total)
  • tx, I looked at the search results and there seem to be some useful articles, but I’m really a n00b when it comes to PHP. do you maybe know how to impliment something like this? would it be in The Loop? Should I create a DIV for it, or find a way to latch a stylesheet to the current DIV?

    sorry, I’m really clueless 🙂

    With the help of a friend (a programmer) I got an extremely simple solution. Instead of:

    <div class="post">

    I now use the following snippet of code:

    <div class="css_author_<?php the_author(); ?>">

    …and just style it accordingly with CSS. So for example if the author’s login name is funkywriter, the class for the post will be css_author_funkywriter. Styling it in CSS is easy. This approach works much better than the if statements I was struggling with 🙂

    So, do the multiple authors posts show up on the same page or do they go to their own pages?

    Our church has a blog and we want to set it up for three authors but I’m having fits with it.

    How can Joe write a post that goes to a page that just has Joe’s posts on it and Mary write a post that goes to a page that just has Mary’s posts on it, et.al.?

    Or is this possible?

    whooami

    @whooami

    Member

    Or is this possible?

    it is.

    dude/dudette, youre like one of under 8 or so ppl that actually post here and have 4 years in .. you REALLY need to use that search. 🙂

    I never post to the forums until I’ve done a search. The problem with searching is knowing what to search for. I’ve searched under “Multiple Authors on Same Blog” and the results just gave me links to a few forum posts that didn’t answer my question.
    Perhaps I need to search using a different phrase but I don’t know what that phrase would be.

    whooami

    @whooami

    Member

    fair enough, I suspect your just overthinking what you want to do.

    you just want to exclude posts from the front page == doable

    the author pages are cake..

    do you want categories? archives? yes/no both doable.

    🙂

    I’ve made the front page of our churches blog static. It never changes.

    The links across the top point to the obvious pages.

    Now, the pastor wants a blog page, his wife wants a blog page and one other church member wants a blog page.

    I’ve created a page template named “Blog” and I’ve designated it as the “Posts Page”. So, the pastor’s posts go here, his wifes posts go here and the other church member’s posts go here.

    I don’t know how to set it up so that the other two can post their articles to their own pages.

    HERE is a link.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Per post CSS for blog with multiple authors?’ is closed to new replies.