Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Listing events as "classes" in Fitness Theme | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Listing events as "classes" in Fitness Theme

Listing events as "classes" in Fitness Theme

Posted: May 28, 2013 at 11:28 am

Viewing 1 reply thread


Eric Fischer

May 28, 2013 at 11:28 am

Hey folks,

I’m developing a site for a client now (it’s not live yet), and I need a little assistance. The “Fitness” theme they want to use is already set up with a post category called “classes”, that list both on the classes page, and in a widget on the front page. I have already added the shortcode to get EventEspresso’s events tagged “classes” to appear. That was easy.

What I need to know is how can I modify the existing widget to draw from Event Espresso rather than the theme’s “classes” category posts?

The code below is from the page template for the first third display area.

[code language=”php”]<!– Start of home content –>

<div class=”home_content”>

<?php

$featuredport = new WP_Query(‘showposts=1&post_type=class’);

while ($featuredport->have_posts()) : $featuredport->the_post();

?>

 

<img src=”<?php bloginfo(‘template_directory’); ?>/img/classicon.png” height=”27″ width=”21″ alt=”<?php the_title (); ?>” class=”lefthome” />

 

<!– Start of homeclass –>

<div class=”homeclass”>

<a href=”<?php the_permalink (); ?>”><?php the_title (); ?></a>

 

<p><?php $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,10); ?></p>

 

</div><!– End of homeclass –>

 

<?php

if ( function_exists( ‘get_option_tree’ ) ) {

$homeclassmore = get_option_tree( ‘vn_homclassmore’ );

} ?>

 

<?php if ($homeclassmore != (”)){ ?>

 

<a class=”small” href=”<?php the_permalink (); ?>”><?php echo stripslashes($homeclassmore); ?></a>

 

<?php } else { } ?>

 

<?php endwhile; ?>

 

<?php wp_reset_query(); ?>

 

<hr />

 

</div><!– End of home content –>

 

<!– Start of home content bottom –>

<div class=”home_content_bottom”>

<?php

$featuredport = new WP_Query(‘showposts=1&post_type=class&offset=1’);

while ($featuredport->have_posts()) : $featuredport->the_post();

?>

 

<img src=”<?php bloginfo(‘template_directory’); ?>/img/classicon.png” height=”27″ width=”21″ alt=”<?php the_title (); ?>” class=”lefthome” />

 

<!– Start of homeclass –>

<div class=”homeclass”>

<a href=”<?php the_permalink (); ?>”><?php the_title (); ?></a>

 

<p><?php $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,10); ?></p>

 

</div><!– End of homeclass –>

 

<?php

if ( function_exists( ‘get_option_tree’ ) ) {

$homeclassmore = get_option_tree( ‘vn_homclassmore’ );

} ?>

 

<?php if ($homeclassmore != (”)){ ?>

 

<a class=”small” href=”<?php the_permalink (); ?>”><?php echo stripslashes($homeclassmore); ?></a>

 

<?php } else { } ?>

 

<?php endwhile; ?>

 

<?php wp_reset_query(); ?>

 

</div><!– End of home content bottom –>

 

</article><!– End of one third first –>[/code]

  • This topic was modified 11 years, 7 months ago by Josh. Reason: not a translation question


Josh

May 28, 2013 at 6:27 pm

Hi Eric,

In this case I don’t think you’ll need to modify the theme to make this happen. You can try setting the events to be created as posts (not Event posts) and make sure that they are assigned to the class category. Please see this section of the documentation for more info:

http://staging.eventespresso.com/wiki/add-new-event/#create-post

Viewing 1 reply thread

The support post ‘Listing events as "classes" in Fitness Theme’ 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 - Staging Server