-
AuthorSearch Results
-
July 12, 2017 at 3:32 pm #120200
In reply to: Eventica theme – make search find most recent events
AnonymousInactivePlease see below for my current results.php code:
‘
if ( $query->have_posts() ) { ?>
<div class=”tribe-events-list” id=”tribe-events-content”>
<div class=”events-loop tribe-events-loop vcalendar”>
<div class=”row”>
<div class=”tribe-events-page-title-wrap” style=”position: relative; text-align: center;”>
<h2 class=”tribe-events-page-title”><?php echo tribe_get_events_title() ?></h2>
</div><?php while ($query->have_posts()) { $query->the_post(); ?><?php if ( ! defined( ‘ABSPATH’ ) ) { die( ‘-1’ ); } // Setup an array of venue details for use
later in the template $venue_details = tribe_get_venue_details(); if ( isset( $venue_details[
‘linked_name’] ) ) { $venue_name=$venue_details[‘linked_name’]; } elseif ( isset( $venue_details[
‘name’] ) ) { $venue_name=$ venue_details[ ‘name’]; } else { $venue_name=” ; } // Venue
$has_venue_address=( ! empty( $venue_details[ ‘address’] ) ) ? ‘ location’ : ”;
<div class=”type-tribe_events post-3031 tribe-clearfix tribe-events-category-casual tribe-
events-category-development tribe-events-category-education tribe-events-category-engineering
tribe-events-category-exhibition
tribe-events-category-exploring tribe-events-category-gallery tribe-events-category-history
tribe-events-category-learning tribe-events-category-museum tribe-events-category-other tribe-
events-category-science tribe- events-category-textiles tribe-events-venue-2987 tribe-events-
organizer-3034 tribe-events-first col-sm-6″>” title=”<?php the_title(); ?>”>
<div class=”even-list-wrapper”>
<div class=”event-list-wrapper-top”>
<div class=”tribe-events-event-image”>
<?php if(has_post_thumbnail()) : ?><?php the_post_thumbnail( ‘blog-thumbnail’ ); ?><?php else : ?>” src=”%3C?php%20echo%20get_template_directory_uri();%20?%3E/img/thumb-event.png”> <?php endif; ?>
</div>
<div class=”tribe-events-event-date”>
<span class=”dd”><?php echo tribe_get_start_date( null, false, ‘d’ ) ?></span> <span class=”mm”><?php echo tribe_get_start_date( null, false, ‘F’ ) ?></span> <span class=”yy”><?php echo tribe_get_start_date( null, false, ‘Y’ ) ?></span>
</div>
</div>
<div class=”event-list-wrapper-bottom”>
<div class=”wraper-bottom-left”>
<!– Event Title –>
<?php do_action( ‘tribe_events_before_the_event_title’ ) ?>
<h2 class=”tribe-events-list-event-title entry-title summary”>“><?php the_title() ?></h2><?php do_action( ‘tribe_events_after_the_event_title’ ) ?><!– Event Meta –>
<?php do_action( ‘tribe_events_before_the_meta’ ) ?>
<div class=”tribe-events-event-meta vcard”>
<div class=”author <?php echo esc_attr( $has_venue_address ); ?>”>
<?php if ( $venue_name ) : ?>
<div class=”tribe-events-venue-details”>
<?php echo wp_kses_data( $venue_name ); ?>
</div><?php endif; ?>
<div class=”time-details”>
<?php tokopress_tribe_event_time(); ?><?php echo tokopress_tribe_event_recurringinfo( ‘<br/><i class=”fa fa-refresh”></i> ‘); ?>
</div>
</div>
</div><!– .tribe-events-event-meta –>
<?php do_action( ‘tribe_events_after_the_meta’ ) ?>
</div>
<div class=”wraper-bottom-right valign-wrapper”>
<i class=”fa fa-ticket”></i> <?php if ( $cost=tribe_get_cost( null, true ) ) printf( ‘<br/><span class=”cost”>%s</span>’, $cost ); ?>
</div>
</div>
</div>
</div><?php } ?>
</div>
</div><?php do_action( ‘tribe_events_before_footer’ ); ?>
<div id=”tribe-events-footer”>
<!– Footer Navigation –>
<div class=”pagination”>
<?php
/* example code for using the wp_pagenavi plugin */
if (function_exists(‘wp_pagenavi’))
{
wp_pagenavi( array( ‘query’ => $query ) );
}
?>
</div>
</div>
‘Thanks,
IhtezazJuly 12, 2017 at 3:19 pm #120197In reply to: Eventica theme – make search find most recent events
AnonymousInactiveHi Trevor,
I implemented the if statement but it’s not what I am quite looking for. I want the results to show so that any recent event (e.g within a 30 day period) is displayed first, followed by any ongong events. I have contacted the theme developer as it may be a question for them but if you think you have a solution, please let me know.
I have also got another issue with the results page:
The previous results displayed a gray bar on top of all events within a month e.g : if you go onto the site and search ‘itv’ next to the date filter on the events page, you will see the grey bar:
https://www.mcrgreater.co.uk/events/
I have found the code to add the bar:
<?php tribe_events_list_the_date_headers(); ?>
but I am not too sure where it would go in the results.php file.
I can show you the issue on skype – if needed.
Thanks,
IhtezazJuly 11, 2017 at 1:05 am #119857In reply to: Custom content disappears on search
AnonymousInactiveThe custom content is added in a custom field in the back-end and then called in results.php, before the loop as follows:
<?php if( get_field('luxury_holidays_content') ): ?> <div class="masonry-layout-panel custom-content"> <?php the_field('luxury_holidays_content'); ?> </div> <?php endif; ?>
Strangely, if I hard code the custom content in results.php, it is always visible. However, if I call it in PHP as above, it gets removed when a search or form reset is performed.
July 10, 2017 at 9:41 pm #119824In reply to: Custom content disappears on search
TrevorParticipantHi
Anything that appears (is coded) inside the results.php template will be refreshed by the Ajax call, and subject to the search filter. This is likely why the content that you want to be fixed is disappearing. It needs to be outside the results.php template file.
July 10, 2017 at 8:32 pm #119767In reply to: Custom content disappears on search
TrevorParticipantAre you able to upload the results.php file to a file sharing site and share the link with me?
July 7, 2017 at 7:50 pm #119366In reply to: Hide all posts
TrevorParticipantHi
I just did a search:
http://cinemascandinavia.com/resources/?_sft_category=interviews
And it has only one set of results?
To edit the results.php template, you need to follow this guidance, and then edit the results.php template file you have just copied into your child theme folder. Note the ‘Older Posts’ bit is navigation.
July 7, 2017 at 1:10 pm #119307In reply to: How to disable the title link
TrevorParticipantI assume that you are using a copy of the results.php as per our customizing guide?
If so, edit that file and find this line:
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
and change it to:
<h2><?php the_title(); ?></h2>
July 4, 2017 at 3:32 pm #118671In reply to: Problem whit search display
TrevorParticipantSo, if you open the copy of the results.php in an editor, you can change it.
Delete any of these lines:
<p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p>
These are:
Categories
Tags
DateJuly 1, 2017 at 8:34 pm #118188
TrevorParticipantWhat happens if, temporarily, you use the default results.php?
July 1, 2017 at 10:33 am #118142In reply to: No Search Form
TrevorParticipantHi
I can see in the child theme folder you have both the results.php and the results-infinite-scroll.php, and also a sub-folder containg a customized results.php.
However, if you edit/look at the contents/code of the results-infinite-scroll.php file, you will see it has a certain structure and CSS classes. These are crucial to infinite scroll working, so you need to use this code in your customized results.php file.
-
AuthorSearch Results