Support

Home Forums Pre-Sales Compatibility with Thesis ver 2

Compatibility with Thesis ver 2

Posted: September 10, 2015 at 5:25 am


keithwjones

September 10, 2015 at 5:25 am

I have posted about this before:

On a Thesis forum someone is asking about this type of plugin so I gave it a test with Thesis, EE4 Decaf. In events it still does not output details of tickets.

Recently another plugin Types had a similar issue. The cause was:

The issue is really in the global $wp_post_types. Thesis theme is getting the array of post types before Types. So, custom post types from Types won’t appear there.

In Types we have an action called “wpcf_init_custom_types_taxonomies” that initializes all post types. So there is no way to fix that on our side, but on Theme side. I have a proposal, you add the line below in templates.php Thesis file construct method. So the complete code will be this one:

public function __construct($templates) {
global $thesis;
$this->head = is_array($head = $thesis->api->get_option(‘thesis_head’)) ? $head : $this->head;
$this->active = is_array($templates) ? $templates : $this->active;

//Types initializing post types
add_action( ‘init’, ‘wpcf_init_custom_types_taxonomies’);

add_action(‘init’, array($this, ‘init’));
add_action(‘thesis_init_editor’, array($this, ‘init_editor’));
add_filter(‘thesis_site_menu’, array($this, ‘site_menu’), 90);
}

Obviously this would be overwritten on any upgrade.However Thesis has a master.php which is not overwritten and by adding:

//Types initializing post types
add_action( 'init', 'wpcf_init_custom_types_taxonomies', 1);

The problem was solved.

I wonder if EE has a similar problem.

If you could check and give me some code to add I can test it on a test site.

Keith


keithwjones

September 10, 2015 at 5:29 am

Previous post:

Click Here


Seth Shoultes

  • Support Staff

September 15, 2015 at 12:10 pm

Hey Keith,

You can get access to our core code on Github:
https://github.com/eventespresso/event-espresso-core

Is that what you are looking for?


keithwjones

September 16, 2015 at 8:37 am

Seth

That could well be a bit beyond me. However I have made some progress. Strangely I saw a site with Thesis ver 2 with EE. I checked it out but it was using EE3, I tried that version and it does work.

I then went back to EE4, it does create 2 templates, Events and Event but it only displays heading and text content – no ticket system.

I went into the template editor for Event and added a text box which takes HTML and added short code [ESPRESSO_TICKET_SELECTOR event_id=”your_event_id”] which gives available tickets and Register Now. This appears to work ok and produced an invoice.

If I add some more short code I will be able to display other info.

Only problem is that a lot of people do not like using the template editor.

Keith


Seth Shoultes

  • Support Staff

September 18, 2015 at 4:20 pm

Thanks. Let us know if you need anything else.


keithwjones

September 19, 2015 at 2:53 am

Seth

Here is what I have done so far and it appears to work. I would value your views.

Event Espresso and Thesis Ver 2.1
Event Espresso – 4.7.12.decaf
____________________________________________
Install and it creates templates Event and Events. Only output in Events is heading and in Event, heading and post text. No ticket system. There are other templates created which have limited output.

There is a theme Event Espress Arabica 2014 included with EE. Works out of the box so you can see what you are trying to achieve.
_______________________________________________________
Template – EVENTS

#Remove post box from loop.
#Look for 2 purple boxes – Archive Content and Archive Title
#Remove Archive Title – replace with a text box and add:

[ESPRESSO_EVENTS title=”My Super Event List”]

For some reason this appears to wake the content up.

You will need some css as you require.
______________________________________________________________
Template – EVENT

#WP Loop > Post Box (Single)
1. add Text Box: Ticket Selector and add:

[ESPRESSO_TICKET_SELECTOR event_id=”your_event_id”]

2. add PHP Box: Date and Time and add:

<span class=”dashicons dashicons-calendar”></span><?php espresso_event_date(‘l d F Y’); ?>

3. add PHP Box: Venue and add:

<h1><b><span class=”ee-icon ee-icon-venue”></span> Event Location</b></h1>
<h1><b>Venue:</b> <?php espresso_venue_name(); ?></h1>
<h1><b>Venue Telephone:</b> <?php espresso_venue_phone(); ?></h1>
<?php espresso_venue_address(); ?>
____________________________________________________________________
Ref:
PHP Box is not included in a standard install of Thesis.
EE4 Theme Templates and Tags – https://eventespresso.com/wiki/ee4-themes-templates/
Event Espresso 4 Shortcodes and Template Variables – https://eventespresso.com/wiki/ee4-shortcodes-template-variables/

The support post ‘Compatibility with Thesis ver 2’ 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