• Resolved etruchan

    (@etruchan)


    I have read all of the documentation and maybe I have been staring at the screen too long but I cannot find any documentation on how to set up the single-event.php. I have built php files and templates before but this one is kicking my arse.

    I would like to setup a page basically like this website but with the custom fields. Are these auto generated or do I need another plugin?

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    to create ‘single-event.php’ – you need to re-copy your theme single.php and then rename it as single-event.php – https://www.ads-software.com/support/topic/events-manager-eventslocation-pages-cant-get-sidebar?replies=22

    about the demo site, we are using shortcode from NextGen Gallery plugin – https://www.ads-software.com/extend/plugins/nextgen-gallery/ and add it in the event details when creating new event.

    Thread Starter etruchan

    (@etruchan)

    I appreciate your response. I utilized the link you sent and I created the below file.

    <?php get_header(); ?>
    <div id="primary">
    	<div id="content" role="main">
    		<?php
    			global $post;
    
    			$EM_Event = em_get_event($post->ID, 'post_id');
    		?>
    
    		<header class="entry-header">
    		<h1 class="entry-title"><?php echo $EM_Event->output('#_EVENTNAME'); ?></h1>
    		</header>
    <div style="float:left; margin:0px 0px 15px 15px;">
    		<div class="entry-content">
            <?php the_field('event_image'); ?>
    		<p><?php echo $EM_Event->output('#_EVENTNOTES'); ?></p>
            <p><strong>Date/Time</strong><br/><?php echo $EM_Event->output('#_EVENTDATES'); ?><br /><?php echo $EM_Event->output('#_EVENTTIMES'); ?>
            {has_location}
    <p>
    	<strong>Location</strong><br/>
    	<?php echo $EM_Event->output('#_LOCATIONLINK'); ?>
    </p>
    {/has_location}
    <p>
    	<strong>Categories</strong><br />
    	<?php echo $EM_Event->output('#_CATEGORIES'); ?>
    </p>
    		</div>
            </div><!-- #content -->
             <div style="float:right; margin:0px 0px 15px 15px;"><?php echo $EM_Event->output('#_LOCATIONMAP'); ?></div>
            <div class="art-layout-cell" style="width: 100%" >
            <h3>Questions or Tickets</h3><p>If you need any further clarification about this event, please <a href="https://www.theredzonemadison.com/contact-us/">contact us</a>, stop in at 1212 Regent St, Madison, WI 53715, or call (608)251-6766</p><p>We will see you soon.</p>
        </div>
    </div>
    	</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    The only thing that shows up is the header and the title of the page. I am stumped further. Any help is appreciated.

    The only thing that shows up is the header and the title of the page

    That suggests that there is an error in your site somewhere, probably caused by a plugin in your header section that is stopping the page from loading correctly.

    Check your error logs, and disable all other plugins to find the cause.

    Cheers,
    Phil

    Thread Starter etruchan

    (@etruchan)

    So I am correct in assuming then that the code is correct? At least as written.Tweaking may still be needed.

    Thread Starter etruchan

    (@etruchan)

    I have a slider embedded in the header. I do need it there but I will try removing the header from the single-event.php to see what happens.

    If you mean you’re getting rid of the get_header function, that’ll probably cause lot of other problems because it’ll stop key WordPress / plugin stuff from loading.

    Take a look at your source code – the line where the output stops s usually a good indication of what’s causing the problem.

    Thread Starter etruchan

    (@etruchan)

    I changed the .php to this

    <?php get_header(); ?>
          <div class="art-content-layout">
             <div class="art-content-layout-row">
                <div class="art-layout-cell art-content">
                   <article class="art-post art-article">
                      <div class="art-postcontent art-postcontent-0 clearfix">
                      <div class="art-content-layout">
        				<div class="art-content-layout-row">
        					<div class="art-layout-cell" style="width: 100%; text-align: center; " >
    
    			<?php
    				if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    				echo '<img src="'. the_post_thumbnail() .'" />';
    				}
    			?>
        					</div>
        				</div>
    				  </div>
        <div class="art-content-layout">
           <div class="art-content-layout-row">
         	  <div style="float:left; margin:0px 0px 15px 15px;">
    		<h2 class="art-postheader"><?php echo $EM_Event->output('#_EVENTNAME'); ?></h2>
            <?php the_field('event_image'); ?>
    		<p><?php echo $EM_Event->output('#_EVENTNOTES'); ?></p>
            <p><strong>Date/Time</strong><?php echo $EM_Event->output('#_EVENTDATES'); ?><?php echo $EM_Event->output('#_EVENTTIMES'); ?>
            {has_location}
    <p>
    	<strong>Location</strong>
    	<?php echo $EM_Event->output('#_LOCATIONLINK'); ?>
    </p>
    {/has_location}
    <p>
    	<strong>Categories</strong>
    	<?php echo $EM_Event->output('#_CATEGORIES'); ?>
    </p>
    		</div>
          </div>
    	</div>
             <div class="art-content-layout">
             <div style="float:right; margin:0px 0px 15px 15px;"><?php echo $EM_Event->output('#_LOCATIONMAP'); ?>
             </div>
             </div>
    <div class="art-content-layout">
        <div class="art-content-layout-row">
    		<div class="art-layout-cell" style="width: 100%" >
            <h3>Questions or Tickets</h3><p>If you need any further clarification about this event, please <a href="https://www.theredzonemadison.com/contact-us/">contact us</a>, stop in at 1212 Regent St, Madison, WI 53715, or call (608)251-6766</p><p>We will see you soon.</p>
            </div>
        </div>
    </div>
        </article>
        </div>
        </div>
        </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    [Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]

    It was showing the same problem. I checked the source code and it was just a bunch of div showing up with nothing in them. I went back to changed the test event and it tells me I am not allowed to edit post.??

    Can you post a link?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Stumped on Custom Pages’ is closed to new replies.