WordPress.org

Forums

Style my Custom Author Page (10 posts)

  1. drezac
    Member
    Posted 3 years ago #

    Sometime back I implemented a Custom Author Page as well as Contributors Page:

    Right now they are unstyled and are drawing from the div id "content"

    I'd like to style these individually. Anyone have any ideas? What should I add to my CSS?

    http://edreach.us/contributors

    http://edreach.us/author/jrowash/

    Thanks for your help:

    DR

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Both pages are styled. If you need to change or add styling, start by looking at the source markup of each generated page.

  3. drezac
    Member
    Posted 3 years ago #

    Like I said they're pulling their styling from the #content in the style sheet. I don't want this to do that.

    I'll need to pull it from somewhere else in the style sheet, and can create that if you can help me with it..
    dr

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Start by using the body_class() in your theme's header.php. That will allow you to make use on page-specific classes in your CSS.

  5. JarretC
    Member
    Posted 3 years ago #

    #content #author-drezac {
         CSS goes here
    }
    #content #author-jaydblackman {
         CSS goes here
    }

    What does it matter if they are within the content DIV? That has no effect on how they are styled if you use the above code.

  6. drezac
    Member
    Posted 3 years ago #

    So this way I have to style each individual author?

    As we add 1 or 2 authors a week, I can't keep going into my style sheet and doing this.

    Surely theres a blanket code I can user for all authors on this page. Do you see my point?

    Thanks! I think we're close....

    DR

  7. JarretC
    Member
    Posted 3 years ago #

    Oh well I saw you say individually so I gave you that code ;)

    To style them all at once you can do

    #content .author {
         CSS goes here
    }
  8. drezac
    Member
    Posted 3 years ago #

    Aha!

    Let me try that. Thanks! Now that will help me!

    DR

  9. drezac
    Member
    Posted 3 years ago #

    Okay-

    I actually changed my entire Author Template.

    I made the image larger, but it's still got a 12pt font. Also I'd like to add a border around the image. Can we try this again? I want that font to be like 14pt. It's getting it's font size from the #body, but again, I don't want to change the body font, I only want to change to font on this Author page.

    http://edreach.us/author/jaydblackman/
    Can someone inspect my page and help me change those?
    Thanks!

    Daniel

  10. JarretC
    Member
    Posted 3 years ago #

    You need to go into your header.php template most likely and add

    <?php body_class(); ?>

    to your <body> tag. That will add in extra CSS classes that will allow you to specifically target just the author pages.

    Once you have done that, let me know and I'll help you with the CSS for what you want to do. Here is the Codex page for the body_class() function http://codex.wordpress.org/Function_Reference/body_class

Topic Closed

This topic has been closed to new replies.

About this Topic