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


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 6 years, 5 months ago by  Josh. Reason: not a translation question


Josh

  • Support Staff

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://eventespresso.com/wiki/add-new-event/#create-post

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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 6 years, 5 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.