• Hello,

    I know that I can copy the single.php of my theme and rename it, to have another ‘template’ for single posts to choose from… but I want the colors within each template to be different.

    For example… I want the default single post template to have all hyperlinks, metadata links and the post title in WHITE. I then want to be able to select another template whereby all of the aforementioned items are in RED and another in which they are in BLUE. I’m creating a political blog where people are encouraged to write from the left, right and middle… and I would like their posts to reflect, in color, their political leanings, both for aesthetics and informative purposes.

    How can I accomplish this? I would imagine it involves editing/adding to the stylesheet, but I should warn you – css is not my strong point. I use the program Artisteer to create my themes.

Viewing 4 replies - 1 through 4 (of 4 total)
  • you could use categories or tags to mark the ‘color’ of your post; and then use the post_class() template tag for the surrounding div of your post (your theme might already have this).

    once you know the css classes added, use corresponding styles.

    http://codex.wordpress.org/Template_Tags/post_class

    a link to your site might get you a little more help.

    Thread Starter KMLProxy

    (@kmlproxy)

    Thanks for the quick response, the site is below:

    http://www.thepoliticalpodium.com/

    As of now, the post contains a mixture of red and blue links, as evident. I already described above what I want, so I won’t repeat that again and bore you.

    Could you explain a bit more about marking the color of the post?

    Thread Starter KMLProxy

    (@kmlproxy)

    Anyone have any more suggestions? Again, I’d just like to be able to choose a ‘template’ or some other way so that each post ‘template’ has different colored hyperlinks – both in the article, the header/footer metadata and the post title.

    Thread Starter KMLProxy

    (@kmlproxy)

    So, I’ve installed the CUSTOM POST TEMPLATE plugin:

    http://wordpress.org/extend/plugins/custom-post-template/

    And have got it to work… I’ve created a custom .php file that is a copy of my current single.php file, and am able to see both in a drop-down menu when writing a post.

    Here is where I need help. Within my stylesheet, I’m able to find every item I want to be a different color within the custom post template by searching for its’ HEX number. I assume that I need to duplicate all of these items and change the HEX number to the new desired color, and then re-name them somehow, and then call for the re-named versions within my custom template .php file.

    My question is, with a particular element, say, for example:

    a:link,
    .art-post li a:link
    {
    font-weight: bold;
    text-decoration: none;
    color: #7B197B;
    }

    I want to change that color to something else… do I simply copy and paste this and change the number? What element do I need to rename so that it is seen as a separate entity that I can call for in the .php? What do I need to change in the .php to call the new stylesheet entity? there is no “.art-post li” in the .php template.

    Please help! I feel like I’m close!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create different templates for posts? Colors?’ is closed to new replies.