Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter taipeievents

    (@taipeievents)

    @agelonwl

    The snippet including: <div id=”primary” style=”width: 60%”> seems to get the sidebar on the side of my pages now too.

    I use 80%.

    1. There is still lots of padding around the “primary” div though.

    Image –> http://imageshack.us/photo/my-images/35/screenshot20120429at924.png/
    Link –> http://taipeievents.com/?event=world-expos-pavilion-of-taipei-exhibition

    2. Also, where does the Event Title come from. I don’t have it in my template. If I add my own Event Title in the code, then I have the Event Title two times.

    Here is the code I’m using in my event-single.php.

    <?php get_header(); ?>
    <div id="primary" style="width: 80%">
    
    <?php
    global $post;
    $EM_Event = em_get_event($post->ID, 'post_id');
    ?>
    
    <div style="float:left; margin:0px 20px 30px 0px;"><?php echo $EM_Event->output('#_MAP'); ?></div>
    <p>
    	<strong>Date / Time</strong><br/>
    	<?php echo $EM_Event->output('#_EVENTDATES'); ?><br /><?php echo $EM_Event->output('#_EVENTTIMES'); ?><br/>
    
    	<img src="/images/locationpin.png" width="25" height="25" margin="5" style="vertical-align:middle;" /> <?php echo $EM_Event->output('#_LOCATIONLINK'); ?><br/>
    
    <img src="/images/categorystar.png" width="25" height="25" margin="5" style="vertical-align:middle;" /> <?php echo $EM_Event->output('#_CATEGORYLINK'); ?>
    <br/><br/>
    <br style="clear:both" />
    <div style="float:left; margin:20px 20px 20px 0px;"><?php echo $EM_Event->output('#_EVENTIMAGE'); ?></div>
    <h2>Description:</h2>
    <?php echo $EM_Event->output('#_EVENTNOTES'); ?>
    <p><strong>More Information:</strong><br/>
    <a href=<?php echo $EM_Event->output('#_ATT{Website1}'); ?>><?php echo $EM_Event->output('#_ATT{Website1}'); ?></a><br/>
    <a href=<?php echo $EM_Event->output('#_ATT{Website2}'); ?>><?php echo $EM_Event->output('#_ATT{Website2}'); ?></a><br/>
    </p>
    
    	</div><!-- #content -->
    </div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I still think somehow my divs are messed up because I have way too much padding around the post.

    Thread Starter taipeievents

    (@taipeievents)

    I think I’ve figured out something using the Reveal plugin, which tells me which template file is being used on each page.

    The pages that have a sidebar are the ones I’ve created myself like this page. They seem to be using the /twentyeleven/sidebar-page.php template.

    The pages that Events Manager auto generates for Events, Locations and Categories are using the /twentyeleven/page.php template. These pages don’t have sidebars like this page.

    So, I tried modifying the page.php template and adding a <?php get_sidebar() ?> function but it wouldn’t properly position on the right side no matter where I placed it in page.php.

    It feels like there is something wrong with my installation of Events Manager or WordPress. I think the single-event.php template I made is being fed into the page.php and that is causing problems.

    I’ve been working on this for 24 hours and sadly am not any closer to the solution.

    Does anybody have any ideas for me to try?

    This plugin was instrumental in getting to the bottom of this: http://coffee2code.com/wp-plugins/reveal-template/

    That plugin is really great. I’m curious, once you figure out what template Events Manager is using, how can you change it?

    For my site (taipeievents.com), Events Manager displays my sidebar on some pages where it’s using sidebar-page.php but oh the single Location/Event & Category pages it’s using page.php.

    Any way to change it?

    Thread Starter taipeievents

    (@taipeievents)

    I’m looking at the code from a page with a sidebar that works and one that doesn’t. Maybe the key to the problem is here?

    From a Single Events page, with no sidebar showing
    http://taipeievents.com/?event=ignite-taipei-4

    <body class="single single-event postid-122 logged-in admin-bar custom-background single-author singular two-column right-sidebar" onclick="if(stWidget.buttonClicked==false){stWidget.stopClosing=false;stWidget.openDuration=0;stWidget.stClose(100);}">

    From a Single Page, with sidebar that works

    <body class="page page-id-127 page-template page-template-sidebar-page-php logged-in admin-bar custom-background single-author two-column right-sidebar" onclick="if(stWidget.buttonClicked==false){stWidget.stopClosing=false;stWidget.openDuration=0;stWidget.stClose(100);}">

    Thread Starter taipeievents

    (@taipeievents)

    Thanks for the example code! I see how the code works to call stuff from $EM_Event. I still have a few problems with the pages though.

    1. The Event name is printed twice. It’s like my template is being used inside of another template. The content is all nested underneath the first title.
    2. The sidebar shows up under the #_EVENTNOTES not on the right.

    I checked my page using the http://validator.w3.org/ and it told me there are two instances of the “primary” div.

    It feels like there is something really wrong with my Events Manager. I wonder if this is a problem with my host’s setup of WordPress. I use Freehostia.

    Here is an example page:
    http://taipeievents.com/?event=2012-neihu-strawberry-festival

    I’m going through the HTML it creates to see what’s going on.

    Thread Starter taipeievents

    (@taipeievents)

    Thanks!

    1. Tried changing it to the “posts” and “pages” but it has little effect.

    2. Found event-single.php. It has very little in it :/

    global $EM_Event;
    /* @var $EM_Event EM_Event */
    echo $EM_Event->output_single();

    I tried adding get_sidebar(); at the end but that just put the sidebar underneath the event content.

    I’m quite lost, the more I read, the more confused I get. I thought it would be simple to add a sidebar to these event pages. I’m pretty new to PHP.

    Have any code suggestions? or an example I could look at?

    Thanks again.

    Thread Starter taipeievents

    (@taipeievents)

    Oh and the other major problem (maybe it’s related?) is that a new Location takes it’s #_LOCATIONNOTES from the #_EVENTNOTES of the Event that created the Event.

    🙁

Viewing 7 replies - 1 through 7 (of 7 total)