• Resolved Dying2Live

    (@dying2live)


    So I’m trying to write a conditional statement that will pull in two separate sidebars depending on an event category on the Single Event Page, but I’m having no luck. Any help would be appreciated and I’m willing to either do it by tag or category.

    what I have right now looks like this this:

    <?php if ( in_category( '18' ) ) : ?>
    	<?php get_sidebar('apples');?>
        <?php else: ?>
        	<?php get_sidebar('oranges');?>
    <?php endif; ?>

    Thanks in advance.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Dying2Live

    (@dying2live)

    Thanks for the reply aglonwl.

    I tried switching the posts to pages and I’m using the “has_term” conditional tag in the single-event.php, but I’m still not having any luck. I guess what I’m not getting is how to call/single out a specific category in Events Manager. You wouldn’t happen to know how that is done would you? I cant find any documentation on it.

    Thread Starter Dying2Live

    (@dying2live)

    This is the code that I have in my single-event.php file:

    <div class="content">
        	<div class="i-am-lazy">
            <div class="main-col">
            	<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
                	<div class="static-content">
    					<?php the_content(); ?>
                    </div><!--Close static-content --> 
    
            </div><!--close main body -->
            <aside>
                <?php if ( has_term( 'webinar' ) ) : ?>
                    <h2>What to Expect</h2>
                        <p>
                        <img src="<?php bloginfo('template_url'); ?>/images/gr_events_sb_img1-02.gif" border="0" /></p>
                        <strong>1. Presentations</strong>
                        We invite experts to seed our conversation.
                        </p>
                        <p>
                        <img src="<?php bloginfo('template_url'); ?>/images/gr_events_sb_img2-02.gif" border="0" />
                        </p>
    
                        <strong>2. Member Exchange</strong>
                        We discuss what we’ve heard and share our experiences.
    
                        <p>
                        <img src="<?php bloginfo('template_url'); ?>/images/gr_events_sb_img3-02.gif" border="0" />
                        </p>
                        <strong>3. Networking.</strong>
                        We continue the conversation and enjoy ourselves.
                <?php else: ?>
    
                <?php endif; ?>
            </aside>
        <?php endwhile; ?>
        <?php get_footer(); ?>
    Thread Starter Dying2Live

    (@dying2live)

    I found an older post with this snippit.

    add_action('init', 'demo_add_default_boxes');
    function demo_add_default_boxes()
    {
    register_taxonomy_for_object_type('category', 'event');
    register_taxonomy_for_object_type('category', 'event-recurring');
    }

    I added it to my functions file and was able to use WordPress’s categories and not Event Manager’s.

    this was the older post:
    href=”https://www.ads-software.com/support/topic/events-manager-using-post-categories?replies=7

    Thanks for the help though.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Events Manager] Condidtional Statement by category pulling in two seperate sidebars’ is closed to new replies.