Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

How can I insert individual images for individual categories, while excluding some?

$
0
0

I am trying to edit my current wordpress theme... im editing the file template for my category pages. I have so far an idea of what to do... but I want to add a few more specific images to match its category while excluding the others... How can I add more to the statement?

I want to add 1 for Technology, 1 for Entertainment, 1 for Lifestyle, and 1 for Business.

<?php if (is_category('Technology')) : ?>

<div class="container gridlove-ad-below-header round_corners">
    <div class="gridlove-ad">
    <style>
        .top_home_page { width: 320px; height: 100px; }
        @media(min-width: 500px) { .top_home_page { width: 468px; height: 60px; } }
        @media(min-width: 800px) { .top_home_page { width: 728px; height: 90px; } }
        .round_corners { border-radius: 5px !important;}
    </style>

    <img class="round_corners hover-shadow" src="https://da-pulsecom.stage.site/wp-content/uploads/2019/11/Store-Content-Technology.png"/>
    </div>
</div>

<?php elseif (is_category('News', 'Science')) : ?>
<h5>No store image goes here</h5>
<?php else : ?>
<p>This is some generic text to describe all other category pages, 
I could be left blank</p>
<?php endif; ?>


enter image description here


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>