WordPress.org

Ready to get started?Download WordPress

Forums

Different colour H1 heading on each page? (3 posts)

  1. drog1998
    Member
    Posted 2 years ago #

    Hi there,

    i'm, trying to assign a different color to each H1 heading on each page but i'm having a little trouble understanding how you do it.

    I'm also looking to place a different colour logo on each page too.

    Here's my code from page.php of my template.

    http://pastebin.com/Vbhe6RtQ

    Hopefully you can help

    Thanks.

  2. Steffen Jørgensen
    Member
    Posted 2 years ago #

    You could use the "the_ID" as a CSS selector:

    .post-id-123 h1{
        color: #123;
        }
    .post-is-234 h2{
        color: #234;
        }

    http://codex.wordpress.org/Function_Reference/the_ID

  3. drog1998
    Member
    Posted 2 years ago #

    Hi Steffen,

    thanks for your reply.

    So would i put that in my style.css.

    so i've change my permalinks so that they are post names so for example:

    http://skyhub.com.au/sample-post/

    so would i write something like....

    .post-id-sample-post h1{
        color: #FFFFFF;
        }

    Thanks for the help.

    [ Please do not bump, it's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.