Support

Home Forums Event Espresso Premium EE4 // single-event_espresso.php // archive-event_espresso.php

EE4 // single-event_espresso.php // archive-event_espresso.php

Posted: August 18, 2016 at 6:05 am


SapphireBSL

August 18, 2016 at 6:05 am

Hi
Is there a link anywhere to find what text to put in? single-event_espresso.php // archive-event_espresso.php and the other custom pages (a list of filenames would also be helpful).

The text i have been using i got from https://codex.wordpress.org/Creating_an_Archive_Index

<?php
/*
Template Name: Archives
*/
get_header(); ?>

<div id="container">
	<div id="content" role="main">

		<?php the_post(); ?>
		<h1 class="entry-title"><?php the_title(); ?></h1>
		
		<?php get_search_form(); ?>
		
		<h2>Archives by Month:</h2>
		<ul>
			<?php wp_get_archives('type=monthly'); ?>
		</ul>
		
		<h2>Archives by Subject:</h2>
		<ul>
			 <?php wp_list_categories(); ?>
		</ul>

	</div><!-- #content -->
</div><!-- #container -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

But I am guessing there is a standard loop for EE that would be better?


Tony

  • Support Staff

August 18, 2016 at 6:44 am

Hi there,

Do you need to take over full control of the templates?

There are valid reasons for doing so but if you just want to remove some details (for example remove the sidebar from single events or the event list) you don’t need to take full control of the templates to do that so I’m just checking there isn’t an easier way to do what your after.

By default Event Espresso hooks into the_content() and injects the details through that, this means you can generally use the standard single.php (or archive.php) template. If you want more control over the page you can create a single-espresso_events.php template from your themes standard single.php template and move content around (whilst still allowing EE to control the event details output).

If you want FULL control over the templates that’s also possible in the way you are doing now, but a lot of the time its not needed. For an example of how you can setup your templates take a look within:

\event-espresso-core-reg\public\Espresso_Arabica_2014\

That’s an example child theme based on twentyfourteen (you can’t just install that theme as a child theme and expect it to work with your current theme unless your using twentyforuteen, which I’m guessing your not) that shows you how you can manually call the template files to include EE details.

The support post ‘EE4 // single-event_espresso.php // archive-event_espresso.php’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso