Support

Home Forums Event Espresso Premium Search.php is the same as archive.php in my template

Search.php is the same as archive.php in my template

Posted: September 28, 2016 at 9:52 am

Viewing 10 reply threads


MedDive

September 28, 2016 at 9:52 am

Hi,

Some months ago I was having a problem with the search.php/archive.php of my template (they are the same archive).
You told me to create a child of my template to do some changes.

I’m finally working again with this project and I have been able to make the child

Can you tell me what is the next step?
You can see the historic of the problem here:
https://eventespresso.com/topic/no-event-list-just-search-results-page/#post-190549

Thank you!


Tony

  • Support Staff

September 29, 2016 at 6:54 am

Hi there,

Can you resend the latest copy of the theme you are using to support[at]eventespresso.com please?

I believe I have a copy of the theme you are using however on checking over the previous thread I’m not so sure so best just to double check.

Can you post a couple of examples for your site that show the problem too please?
(Its been a little while so trying to recap and your site is different)


MedDive

September 29, 2016 at 9:42 am

Ho Tony,
I’ve send it to support@eventespresso.com. It’s ok?

thanks!


MedDive

October 3, 2016 at 6:31 am

Hi?? Have you received it?
Thank you!


Tony

  • Support Staff

October 5, 2016 at 4:14 am

I did receive the theme, thank you.

So the theme is doing some odd things to get the info it wants, most of which does not apply to Event Espresso posts.

Your next step is to copy the archive.php from your parent theme into your child theme, then rename that copy in the child theme to archive-espresso_events.php

That template will then load only for EE events.

A lot ot the code within that archive is simply not needed when you do this, the main change you will need to make is to change:

echo do_shortcode($the_excerpt);

To just:

the_content();

Then add this to your child themes functions.php file:

add_filter( 'FHEE__EED_Event_Archive__template_include__allow_custom_selected_template', '__return_true' );

You will now have a template that loads only for EE events, it will load all of the event details needed within the event list but will still look like a search page.

You can remove the sidebar from the template by removing (or commenting out):

get_sidebar('search');

The title will need to be manually set but it depeneds on what you want to display.

Here is an example of an archive-espresso_events.php file based on your theme – http://take.ms/MC4cg

There are some comments in that file showing what has been removed, you can compare that with the original archive.php file and continue to make ammendments to the file as needed.


MedDive

October 5, 2016 at 10:03 am

Nice!!
All done 🙂
I’ve made some changes on the archive-espresso_events.php (code and css) and now it seems it’s showing all correct.

Only just one thing i’m seeing now: I’ve activated the “status banner” in the event list and all are showing “Upcoming” but i have one “Sold out” event (the first one: “Sábado 8-10-2016 15h”).

How can I change this status banner to “sold out”?:
http://www.mediterraneandive.es.mialias.net/events/

Thank you!


Tony

  • Support Staff

October 5, 2016 at 10:13 am

Edit that event and take a look at in the sidebar, you’ll see a ‘Event Registration Options’ metabox that shows ‘Active Status’

What does it show there?


MedDive

October 5, 2016 at 10:21 am

Active Status: Sold Out (yellow/orange banner)


Tony

  • Support Staff

October 6, 2016 at 2:57 am

Hmm, in that case the banner should already show Sold Out.

If you update the event within the admin does it change the banner on the front end?


MedDive

October 6, 2016 at 11:18 am

Nops!


MedDive

October 6, 2016 at 11:19 am

Ei!!!! Idon’t know why, but now is ok!!

Viewing 10 reply threads

The support post ‘Search.php is the same as archive.php in my template’ 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