WordPress.org

Support

Support » Plugins and Hacks » Events Manager » [Resolved] Style Event By (odd, even) Count

[Resolved] Style Event By (odd, even) Count

  • Working on site: http://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:

    http://wordpress.org/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.

    http://wordpress.org/extend/plugins/events-manager/

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