• I don’t have a child theme but instead am using a plugin that allows me to add custom css to individual posts and pages as well as to the whole site.

    The theme is one I created myself using Artisteer and I have a static home page.

    Using the plugin I have changed the colour of the links in the widget blocks on different pages of my blog using the following code:

    .page-id-**** .art-blockcontent a, .art-blockcontent a:link{
    color: #ff9000;
    }

    .page-id-**** .art-blockcontent a:hover, .art-blockcontent a.hover{
    color: #ffffff;
    }

    This works perfectly and I am able to change virtually any element I want this way. I also have different header images on each page.

    But I cannot work out how to make changes to the blog pages though so that the code would change elements on all blog pages that are served to the user – or any blog pages for that matter including the main blog page.

    I would like different link colours for each widget such as Recent Posts, Recent Comments, Archives, Categories etc.

    I am sure that rather than a page id I should use .blog
    But have so far not been able to make this work

    I have tried
    .blog .recent-posts-2 a, .recent-posts-2 a:link{
    color: #ff9000;
    }
    and
    .blog .recent-posts-2 .art-blockcontent a, .art-blockcontent a:link{
    color: #ff9000;
    }

    I have tried this code on the blog page and in the section for the whole site with and without the !important and it is having no effect whatsoever.

    Am I barking up the completely wrong tree here?

    Do you have any idea how I may be able to achieve this?

    My blog is at https://www.colourityou.co.uk

    Many thanks in advance to anyone who can help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m sorry but we do not support Artisteer themes here. Try asking on https://www.artisteer.com/?forum_id=13&p=forum_topics

    Thread Starter Lois Pallister

    (@lois-pallister)

    Okay thank you for your help

    For the blog page itself (AKA, the index page), you use .blog, but to target all individual post pages, you use .single-post instead.

    Thread Starter Lois Pallister

    (@lois-pallister)

    Thanks for trying to help CrouchingBruin but I’m not sure I understood your comment although I will be looking into it as I think I will need this later.

    I found a solution on a site for another theme.
    Luckily, although the question was 5 years old the blog was still there and I was able to figure out how to use it with my Artisteer theme and it seems to be working although I haven’t finished changing the colours for all the widgets yet and there are some odd changes to those I haven’t done yet!

    But I do think this is working when added to the css box for the whole site:

    #recent-posts-2 .art-blockcontent a, .art-blockcontent a:link{
    color: #e26700;
    }

    #recent-posts-2 .art-blockcontent a:hover, .art-blockcontent a.hover{
    color: #ffffff;
    }

    #categories-2 .art-blockcontent a, .art-blockcontent a:link{
    color: #ff0000;
    }

    #categories-2 .art-blockcontent a:hover, .art-blockcontent a.hover{
    color: #ffffff;
    }

    I used to handcode sites and knew the css I needed for that as in my driving school site to be found at https://www.safemotoring.co.uk

    But I can see I have a lot more to learn now and as soon as I get this current site to an operational state I will take the time to do that.

    I am not sure why I am using a ‘#’ rather than a ‘.’
    I now know that the former is an ‘id’ selector rather than a ‘class’ selector but as I said I have a lot to learn and intend to understand css as well as I understand html.

    And then maybe tackle php! There is a lot for this old handcoder to learn but I’m loving the responsive aspect of WordPress and once I am satisfied that the SEO will work for my driving school site as well or better than I have managed via handcoding I will change that site over to WP too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help needed for CSS to work for all the blog pages’ is closed to new replies.