Support

Home Forums Event Espresso Premium Event Details Page

Event Details Page

Posted: July 31, 2019 at 2:19 pm

Viewing 32 reply threads


learn@refocusrealestate.com

July 31, 2019 at 2:19 pm

How do you add a theme to EEs Event Details page (https://refocusrealestate.com/events/principles-of-real-estate/)? I’m using Elementor and I’m not able to edit the EE page.


learn@refocusrealestate.com

August 1, 2019 at 3:41 pm

Anyone have an idea or can provide assistance?


Josh

  • Support Staff

August 1, 2019 at 3:59 pm

Hi,

Can you clarify what you mean by “add a theme”? For example are you looking to change the colors of specific elements, arrange the layout differently, or something else?


learn@refocusrealestate.com

August 1, 2019 at 4:07 pm

I’m trying to remove the Page Title (Principles and Practice of Real Estate) and have it mimic the style of all my other pages (e.g., https://refocusrealestate.com/real-estate-salesperson/). I would like to have the event details appear below the page image and title. Right now, you can see it has a standard gray banner across the top.

I need it to have the same style on for all my Events, not just for a specific Event.

Also, like this other EE users page.
https://deservicesaztraining.com/classes/article-9-training/


Josh

  • Support Staff

August 1, 2019 at 4:16 pm

It sounds like what you want to do is to tell the WordPress theme to not use its single.php template when displaying and event, and instead it should use its page.php template. If that’s the case, you can add this code:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/jf_ee_custom_post_type_template.php

You can add the code from the above-linked gist to a functions plugin or, if available, into your WordPress child theme’s functions.php file.


learn@refocusrealestate.com

August 1, 2019 at 10:06 pm

I created a child theme and added a functions.php file, then copied the github code into the functions file but it still does not allow me to edit the page with the Elementor page builder.


Tony

  • Support Staff

August 2, 2019 at 3:23 am

Hi there,

Event Espresso does not support any type of page builders, so the above won’t allow you to edit the page with Elementor.

The above code is telling your theme to use a different template file (page.php) from within the theme to output the event details, how that will display on the front end is down to your theme.

If you edit an event, does it show a ‘Page template’ section that allows you to select a specific template to use? If so does selecting any of those templates, saving and viewing the event look closer to what you want to do?

(Note – I know you don’t want to set a template on a specific event, but those templates are availabl in your theme so if one works we may be able to give you a snippet that sets them EE events by default).


learn@refocusrealestate.com

August 2, 2019 at 9:13 am

EE has a lot of shortcodes; why is there not one for this page?

I understand you do not support a page builder but it should be that difficult to add a Header image and some text before displaying the Event information on a page.

In edit mode, there are 4 Page Templates to choose (Default Template, Elementor Canvas, Elementor Full Width, Landing Page). I tried all 4 and none of them allow me to create the necessary look.

If you click the Register Now button it takes you to Check Out page. This is how I’m wanting the Event page to appear.


Josh

  • Support Staff

August 2, 2019 at 9:22 am

If you click the Register Now button it takes you to Check Out page. This is how I’m wanting the Event page to appear.

The code I gave you earlier will do exactly that: Make the event page look like another other page on the site that uses the page.php template from the theme.

I wonder, did you activate the child theme after adding the code? If not, you actually need to activate the child theme. Alternatively, if you prefer to not use a child theme, you can add the code to a site specific plugin (see also http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/ ) then activate the plugin.


learn@refocusrealestate.com

August 2, 2019 at 10:56 am

Yes, the child theme is active. I attempted to add the code to a site-specific plugin per the instructions but having the same issue.


Josh

  • Support Staff

August 2, 2019 at 11:43 am

What you could do is install this plugin:

https://wordpress.org/plugins/show-current-template/

which will help you verify which template is loading on the page.


learn@refocusrealestate.com

August 2, 2019 at 12:18 pm

I installed the plugin and reloaded the page. It states Template: header-footer.php.

I checked 5 other pages on my site and they state Template: page.php.


Josh

  • Support Staff

August 2, 2019 at 12:44 pm

That sounds like Elementor may be interfering with the standard WordPress template loading of that page. If you deactivate the Elementor plugin does the page.php template get loaded instead?


learn@refocusrealestate.com

August 2, 2019 at 1:34 pm

It’s only happening on that one page on the entire site.

Sorry, I should have clarified. The Template: header-footer.php displayed when Elementor Full Width was selected as the Page Template.

When I changed the Page Template to Default Template, it displayed Template: page.php.


Josh

  • Support Staff

August 2, 2019 at 4:35 pm

This doesn’t answer my question. Maybe we can try a different approach to this. Is it that you are looking to use the options shown in this screenshot, but they are not there?

https://slack-files.com/T02SY781D-FM2RZ81B9-f9ef419cc8


learn@refocusrealestate.com

August 2, 2019 at 5:03 pm

Yes, I would like to use the options shown in the screenshot. They currently are not available to me on this page. Thank you for all your help with this.


Josh

  • Support Staff

August 5, 2019 at 2:47 pm

I found this in the OceanWP documentation:

https://docs.oceanwp.org/article/368-add-the-oceanwp-settings-metabox-in-your-custom-post-type

So you’ll add this code to your functions file to add support for the EE event post type:

https://gist.github.com/joshfeck/39588ed5794dfe15b8cb19a4f54d31d4


learn@refocusrealestate.com

August 9, 2019 at 1:46 pm

Adding that code to the Functions file in the child theme did not work. I’m still having the same issue.


Josh

  • Support Staff

August 9, 2019 at 1:53 pm

A child theme’s functions file wouldn’t be recommended in this case.

I advised about this earlier in the topic, that you can add the code to a plugin instead.

In other words, you can add the code to a site specific plugin (see also http://ottopress.com/2011/creating-a-site-specific-snippets-plugin/ ) then activate the plugin.


learn@refocusrealestate.com

August 9, 2019 at 2:18 pm

I added the plugin earlier but it’s not solving the issue either.

<?php
/*
Plugin Name: Site Plugin for refocuscustomize
Description: Site specific code changes for refocuscustomize

//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter('single_template', 'jf_ee_custom_post_type_template');
function jf_ee_custom_post_type_template($single_template) {
  global $post;
  if ($post->post_type == 'espresso_events') {
    $single_template = get_template_directory() . '/page.php';
  }
  return $single_template;
}

*/
  • This reply was modified 5 years, 3 months ago by Josh.
  • This reply was modified 5 years, 3 months ago by Josh. Reason: fix code formatting


Josh

  • Support Staff

August 9, 2019 at 4:48 pm

It doesn’t look like you actually added the code, and it looks like any thing you did add is essentially deactivated, because it’s wrapped in a comment block. Also, it’s missing some of the code from the code example!

Here’s exactly what your plugin should look like, line by line. Feel free to copy and paste from this example and replace with what you have now.

https://gist.github.com/joshfeck/39588ed5794dfe15b8cb19a4f54d31d4


learn@refocusrealestate.com

August 9, 2019 at 9:25 pm

Based on your last post, I added the following code to the plugin which is created in refocusrealestate.com/wp-content/plugins/refocuscustomize/refocusplugin.php. I’m still not able to edit the page.

<?php
/*
Plugin Name: Site plugin for refocusrealestate.com
Description: Site specific code for refocusrealestate.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
// switch template
add_filter(‘single_template’, ‘ref_ee_custom_post_type_template’);
function ref_ee_custom_post_type_template($single_template) {
global $post;
if ($post->post_type == ‘espresso_events’) {
$single_template = get_template_directory() . ‘/page.php’;
}
return $single_template;
}
// add the metabox
function ref_oceanwp_metabox( $types ) {
// Your custom post type
$types[] = ‘espresso_events’;
// Return
return $types;
}
add_filter( ‘ocean_main_metaboxes_post_types’, ‘ref_oceanwp_metabox’, 20 );
add_action(
‘FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__edit’,
‘ref_ee_set_current_screen’
);
add_action(
‘FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__create_new’,
‘ref_ee_set_current_screen’
);
function ref_ee_set_current_screen() {
global $current_screen;
if($current_screen->id == ‘toplevel_page_espresso_events’)
{
$current_screen->post_type = ‘espresso_events’;
}
}
/* Stop Adding Functions */


learn@refocusrealestate.com

August 9, 2019 at 9:35 pm

This reply has been marked as private.


Josh

  • Support Staff

August 12, 2019 at 6:35 am

Hi,

The code I shared with you will not add support for Elementor. What it does instead is add the OceanWP page settings. I shared this screenshot with you earlier, here it is again:

https://slack-files.com/T02SY781D-FM2RZ81B9-f9ef419cc8

When the code is activated on your site, it will add the Ocean WP “Extras” settings, which allows for custom headers and so on. It doesn’t add support for Elementor.


learn@refocusrealestate.com

August 12, 2019 at 7:54 am

As mentioned, I added the code per your instructions and it still is not allowing me to add “custom headers and so on.” The screenshot you referenced is not appearing for me.

I’m not sure why this is the only page that I’ve come across within EE that’s giving so much trouble.


Josh

  • Support Staff

August 12, 2019 at 12:03 pm

After you added the code, did you activate the plugin on the WordPress > Plugins page?


learn@refocusrealestate.com

August 12, 2019 at 12:42 pm

Yes, the plug-in has always been active. I’ve even deactivated and reactivated it.


Josh

  • Support Staff

August 12, 2019 at 12:52 pm

Fantastic. You’ll also need to install & activate this plugin if you have not already done so:

https://wordpress.org/plugins/ocean-extra/


learn@refocusrealestate.com

August 12, 2019 at 5:52 pm

I already have it installed and active.


Tony

  • Support Staff

August 13, 2019 at 4:31 am

The above is a little strange as I’ve just gone through this thread and set up the custom functions plugin Josh provided on a test site, it shows the settings menu in the EE event editor on my test site.

A quick run down, I’m using the theme from https://oceanwp.org/

Installed Ocean Extra from Appearance -> Install plugins.

Open up an EE event in Event Espresso -> Events -> {click on event name}

No Ocean WP settings.

Set up the custom functions plugin Josh provided and refresh the event editor page again, the OceanWP setting metabox loaded right up – https://monosnap.com/file/2pTTT7VQTKEJxuTeQr8aXtCBwfa1tE

So just to confirm, are you checking in the event editor for the above settings?

If you look in the ‘Screen options’ (top right of the event editor HERE)

Is ‘OceanWP Settings’ shown there with a checkbox that is checked?

The code Josh has provided doesn’t provide support for Elementor, you will not have the same level of control with EE events as you do with pages/posts when using Elementor as EE does not support any type of page builder.

The code should be enabling the above meta box to allow you to set the layout used by OceonWP to display the event.


learn@refocusrealestate.com

August 13, 2019 at 12:23 pm

This reply has been marked as private.


Josh

  • Support Staff

August 13, 2019 at 1:09 pm

We’ve already mentioned that Elementor cannot be used on Event Espresso event pages.


learn@refocusrealestate.com

August 13, 2019 at 1:12 pm

Okay, thanks. I’ll cancel my service. I appreciate the assistance.

Viewing 32 reply threads

The support post ‘Event Details Page’ 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