[resolved] News Leak Theme - Category images (2 posts)

  1. coruscant
    Posted 3 years ago #

    Hi. I am using the News Leak theme and I want certain categories to have background images for the background of the <span> that the category title is. I've tried to do this purely within the category template, but I can't get it to work properly. Please excuse the terribly ugly coding but I'm not very knowledgeable about php and even less about css, so I tried to do this without interfering with the css file. Here is my code:
    <span <?php if (is_category('Category 9')) : ?> style="background-image:url(http://onenationconservative.t15.org/wp-content/uploads/2012/11/union-flag.jpg')"> <?php else : ?> style="background-color: #1774b4;" class="category_heading"><?php endif; ?><h3><p style="font-size:28px" style="color:white"><?php single_cat_title(''); ?></h3></p> &nbsp; &nbsp; <font color="white"><?php echo category_description( $category_id ); ?></font></span>
    Here's my site URL: http://onenationconservative.t15.org/ and the category I have for the custom image is the one called 'UK'.

  2. coruscant
    Posted 3 years ago #

    Any chance of any help with this please?

Topic Closed

This topic has been closed to new replies.

About this Topic