• Resolved abeasley54

    (@abeasley54)


    Working on site: https://blo.beautysalonessentials.com/blog/culture/

    At the very bottom left, I have a set of 4 events that are just images currently. I am trying to give each event a ODD or EVEN ID to style them based on ID, or just give each ID count increment their own style.

    I was thinking about using a simular method as the link below, but if there is a more efficient way of doing it please let me know:

    https://www.ads-software.com/support/topic/styling-based-on-category?replies=12

    /** Examples of what I would like to do**/

    1. Start count at (0)
    2. If there is an event, increment by one(1) and give it the style of ‘.event1’
    3. If there is an event, increment by one(2) and give it the style of ‘.event2’
    4. If there is an event, increment by one(3) and give it the style of ‘.event3’ .

    ……and so on.

    I have an example loop of posts that Works perfectly for me with posts but clearly I cant use it for the events manager plugin.

    /**WP Loop Example**/

    <?php if (have_posts()) : ?>
    <?php $count = 0; ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php $count++; ?>
    <?php if ($count == 1) : ?>

    <div class=”item1″>

    <!– Put Your Stuff Here –>

    </div><!– .item# –>

    <?php elseif ($count == 2) : ?>

    <div class=”item2″>

    <!– Put Your Stuff Here –>

    </div><!– .item# –>

    <?php elseif ($count == 3) : ?>

    <div class=”item3″>

    <!– Put Your Stuff Here –>

    </div><!– .item# –>

    <?php elseif ($count == 4) : ?>

    <div class=”item4″>

    <!– Put Your Stuff Here –>

    </div><!– .item# –>

    <?php elseif ($count == 5) : ?>

    <div class=”item5″>

    <!– Put Your Stuff Here –>

    </div><!– .item# –>

    <?php else : ?>

    <?php endif; ?>
    <?php endwhile; ?>
    <?php endif; ?>

    PLEASE HELP!!! and thank you in advance for your help.

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Style Event By (odd, even) Count’ is closed to new replies.