Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2785

    Hi, sorry if I didn’t manage to find the answer to this via search.

    I was wondering how to add a top image to a category page (full width, similar to home page but a static, not a slider). Or to all category pages if that’s easier.

    Or to add blog to a regular page with featured image, whichever works easier.

    Thank you!

    #39297

    PS If I didn’t express myself properly, by full width I meant full width image with the same dimensions as a slider or a featured image that can be added to a full width page right under the categories nav.

    #39298

    Hey,

    open up header.php and replace:

    <!-- ###################################################################### -->
    <div id="contentwrap">
    <!-- ###################################################################### -->

    with:

    <?php
    if (is_category(9,8,6)){
    echo '<img src="my.image.jpg" alt="" title="" />';
    }
    ?>
    <!-- ###################################################################### -->
    <div id="contentwrap">
    <!-- ###################################################################### -->

    Replace 9,8,6 with your category ids and replace “my.image.jpg” with an url to your image.

    #39299

    Hi,

    Thank you, its a bit clunky for some reason as it works predictably only on one category (others range from changing bg colour to not showing image at all) but as I only needed it for one category and to know the principle, its all good for me :)

    #39300

    Glad that I could help you :)

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘How to add a top feature image to a particular category.’ is closed to new replies.