Support

Home Forums Custom Files Add-on (EE3) How to display some of the events in wp home page?

How to display some of the events in wp home page?

Posted: July 22, 2014 at 1:11 pm

Viewing 1 reply thread


Sobin Sebastian

July 22, 2014 at 1:11 pm

Hi,

in my website (http://www.suvclub.in/web/), I have block in home page (“events” bottom of the page) where I should show latest two events (now i am showing other post name events in normal post category not event espresso). kindy let me know how to do this

Now I am using below code, Please let me know How can i show latest events here?


<div id="content" class="newrelease-home">
            <?php query_posts('category_name=events&posts_per_page=2') ?>
            <h2><?php single_cat_title(); ?></h2>
            <?php if(have_posts()): while(have_posts()): the_post(); ?>
         
         <div class="col_w260 float_l nw">
        
       	  <h5> <a href="<?php the_permalink(); ?>"> <?php the_title(); ?></a></h5>
          <?php if(has_post_thumbnail()){ ?>
          <?php the_post_thumbnail('thumbnail_topstories_home', 'class=car_img'); ?>
          <?php } ?>
        	<?php the_advanced_excerpt('length=30'); ?>
			<br/><br>
        </div>
         <?php endwhile;          endif; ?>
        <?php wp_reset_query(); ?>
      </div>


Jonathan Wilson

July 22, 2014 at 4:05 pm

Hi Sobin,

Are you using a widget that lets you select which category pulls to the widget? You may want to create an Events category and have that category pull to the widget.

Does that make sense?

Viewing 1 reply thread

The support post ‘How to display some of the events in wp home 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