• Resolved insept

    (@insept)


    Hello, by far hueman is the best template for what i’m trying to do.
    But the only problem is that the events plug-ins are working badly only at that template. I tryed different one and it worked,

    The problem is that the plugin creates a event.. and this event was suposed to show itself at the blog page as a ‘post’
    but at hueman template this is not happening.

    what can i do? please,

Viewing 5 replies - 31 through 35 (of 35 total)
  • bdbrown

    (@bdbrown)

    Hi insept. I did a bit more testing and think I may have a solution. In your child theme /inc/featured.php file, change the query to include the “orderby” and “order” parameters:

    // Query featured entries
    $featured = new WP_Query(
    	array(
    		'post_type' 			=> array( 'post', 'tribe_events' ),
    		'orderby'			=> 'modified',
    		'order'				=> 'DESC',
    		'no_found_rows'			=> false,
    		'update_post_meta_cache'	=> false,
    		'update_post_term_cache'	=> false,
    		'ignore_sticky_posts'		=> 1,
    		'posts_per_page'		=> ot_get_option('featured-posts-count'),
    		'cat'				=> ot_get_option('featured-category')
    	)
    );

    Let me know how that works.

    Thread Starter insept

    (@insept)

    !! I have no words for this wonderful surprise !!

    It worked!! I ran same testes here.. add new events.. new posts.. remove others… everything is working perfectly!

    Thank you very much for your kind attention!
    You really made it!

    Regards!!

    Hi! Thanks for your help Via Hueman Template, it is really helpful!
    I have one question, maybe you can assist.
    How do i hide the events from the Futured slider to appear second time after the slider?

    Find a solution:
    Add this line to index.php:
    <?php if( is_home() && !is_paged() && $wp_query->current_post <= 1 ) continue; ?>

    So the whole code look like this:

    <?php get_header(); ?>
    
    <section class="content">
    
    	<?php get_template_part('parts/page-title'); ?>
    
    	<div class="pad group">
    
    		<?php if ( hu_is_checked('featured-posts-enabled') ) { get_template_part('parts/featured'); } ?>
    
    		<?php if ( have_posts() ) : ?>
    
    			<?php if ( hu_get_option('blog-standard') == 'on' ): ?>
    				<?php while ( have_posts() ): the_post(); ?>
                                            <?php if( is_home() && !is_paged() && $wp_query->current_post <= 1 ) continue; ?>
    					<?php get_template_part('content-standard'); ?>
    				<?php endwhile; ?>
    			<?php else: ?>
    			<div class="post-list group">
    				<?php $i = 1; echo '<div class="post-row">'; while ( have_posts() ): the_post(); ?>
    					<?php get_template_part('content'); ?>
    				<?php if($i % 2 == 0) { echo '</div><div class="post-row">'; } $i++; endwhile; echo '</div>'; ?>
    			</div><!--/.post-list-->
    			<?php endif; ?>
    
    			<?php get_template_part('parts/pagination'); ?>
    
    		<?php endif; ?>
    
    	</div><!--/.pad-->
    
    </section><!--/.content-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    The previous post was not good… I needed to add a special Quary to The index.php to avoid Date and Ordring problems.
    This is the right code:

    <?php
    // Query featured entries
    $home_events= new WP_Query(
        array(
            'post_type'			=> array( 'post', 'tribe_events' ),
            'eventDisplay'=> 'upcoming',
            'meta_key' => '_EventStartDate',
            'orderby' => '_EventStartDate',
            'order' => 'ASC',
            'no_found_rows'			=> false,
            'update_post_meta_cache'	=> false,
            'update_post_term_cache'	=> false,
            'ignore_sticky_posts'		=> 1,
            'posts_per_page'		=> ot_get_option('featured-posts-count'),
    	)
    );
    ?>
    <?php get_header(); ?>
    
    <section class="content">
    
    	<?php get_template_part('parts/page-title'); ?>
    
    	<div class="pad group">
    
    		<?php if ( hu_is_checked('featured-posts-enabled') ) { get_template_part('parts/featured'); } ?>
    
    		<?php if ( have_posts() ) : ?>
    
    			<?php if ( hu_get_option('blog-standard') == 'on' ): ?>
    				<?php while ( $home_events->have_posts() ): $home_events->the_post(); ?>
    					<?php get_template_part('content-standard'); ?>
    				<?php endwhile; ?>
    			<?php else: ?>
    			<div class="post-list group">
    				<?php $i = 1; echo '<div class="post-row">'; while ( $home_events-> have_posts() ): $home_events-> the_post(); ?>
    					<?php get_template_part('content'); ?>
    				<?php if($i % 2 == 0) { echo '</div><div class="post-row">'; } $i++; endwhile; echo '</div>'; ?>
    			</div><!--/.post-list-->
    			<?php endif; ?>
    
    			<?php get_template_part('parts/pagination'); ?>
    
    		<?php endif; ?>
    
    	</div><!--/.pad-->
    
    </section><!--/.content-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘help with event calendar on hueman template’ is closed to new replies.