Skip Navigation

[Resolved] Not all past events showing

This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 7 years, 3 months ago.

Assisted by: Beda.

Author
Posts
#546206
Screen Shot 2017-07-07 at 1.42.53 PM.png

I am trying to: Get past events all showing.

I visited this URL: hidden link

I expected to see: 16 past events sorted in descending order.

Instead, I got: 2 past events when view is sorted on event number (which is what I want). When I sort on Post Date I get 7 events showing.

The view is called "Connected Events List"

I've included screenshot of settings for view.

Here's loop:

[wpv-layout-start]
[wpv-items-found]

<div id="x-iso-container" class="past-list x-iso-container x-iso-container-portfolio cols-4 isotope">
<!-- wpv-loop-start -->
<wpv-loop wrap="4" pad="true">

[wpv-item index=1]
[wpv-conditional if="( '[wpv-post-status id='$pec-events']' eq 'publish' )"]
<div class="x-portfolio type-x-portfolio isotope-item hentry">
<div class="entry-featured">

[types field="show-poster" size="full" align="none" id="$pec-events"][/types]

<div class="past-icon"></div>
</div>
<div class="entry-wrap cf">
<div class="entry-header">
<div class="past-data">
<h3>[types field="event-num" format="FIELD_VALUE" id="$pec-events"][/types]</h3>
<p class="pec_time" style="margin: 0;">[string2date2 slug="pec_date" eventid="[wpv-post-id id='$pec-events']" format="l, F j, Y"]</p>
<div class="pe-button">

MORE INFO </h5>


</div>
</div>
</div>
</div>
</div>
[/wpv-conditional]
[wpv-item index=other]
[wpv-conditional if="( '[wpv-post-status id='$pec-events']' eq 'publish' )"]
<div class="x-portfolio type-x-portfolio isotope-item hentry">
<div class="entry-featured">

[types field="show-poster" size="full" align="none" id="$pec-events"][/types]

<div class="past-icon"></div>
</div>
<div class="entry-wrap cf">
<div class="entry-header">
<div class="past-data">
<h3>[types field="event-num" format="FIELD_VALUE" id="$pec-events"][/types]</h3>
<p class="pec_time" style="margin: 0;">[string2date2 slug="pec_date" eventid="[wpv-post-id id='$pec-events']" format="l, F j, Y"]</p>
<div class="pe-button">

MORE INFO </h5>


</div>
</div>
</div>
</div>
</div>
[/wpv-conditional]
[wpv-item index=4]
[wpv-conditional if="( '[wpv-post-status id='$pec-events']' eq 'publish' )"]
<div class="x-portfolio type-x-portfolio isotope-item hentry">
<div class="entry-featured">

[types field="show-poster" size="full" align="none" id="$pec-events"][/types]
<div class="past-icon"></div>
</div>
<div class="entry-wrap cf">
<div class="entry-header">
<div class="past-data">
<h3>[types field="event-num" format="FIELD_VALUE" id="$pec-events"][/types]</h3>
<p class="pec_time" style="margin: 0;">[string2date2 slug="pec_date" eventid="[wpv-post-id id='$pec-events']" format="l, F j, Y"]</p>
<div class="pe-button">

MORE INFO </h5>


</div>
</div>
</div>
</div>
</div>
[/wpv-conditional]
[wpv-item index=pad]

[wpv-item index=pad-last]

</wpv-loop>
<!-- wpv-loop-end -->
</div>
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

Here's JS:

jQuery(document).ready(function($){

var $container = $('#x-iso-container');
var $optionSets = $('.option-set');
var $optionLinks = $optionSets.find('a');

$container.before('<span id="x-isotope-loading"><span>');

$(window).load(function(){
$container.isotope({
itemSelector : '.x-iso-container > .hentry',
resizable : true,
filter : '*',
containerStyle : {
overflow : 'hidden',
position : 'relative'
}
});
$('#x-isotope-loading').stop(true,true).fadeOut(300);
$('#x-iso-container .hentry').each(function(i){
$(this).delay(i*150).animate({'opacity':1},300);
});
});

$(window).smartresize(function(){
$container.isotope({ });
});

$container.isotope({ layoutMode: 'cellsByRow' })

$optionLinks.click(function(){
var $this = $(this);
if ( $this.hasClass('selected') ) {
return false;
}
var $optionSet = $this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
var options = {},
key = $optionSet.attr('data-option-key'),
value = $this.attr('data-option-value');
value = value === 'false' ? false : value;
options[key] = value;
if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
changeLayoutMode( $this, options );
} else {
$container.isotope( options );
}
return false;
});

$('.x-portfolio-filters').click(function () {
$(this).parent().find('ul').slideToggle(600, 'easeOutExpo');
});

});

#546342

I cannot assist Custom JS code.
And the Views Loop does show some conditionals, perhaps, those are hiding the Posts?

I need to know exactly what steps I need to follow to reproduce this problem.

The difference in results depending on the sort values is probably due to the fact that not all your posts have such a field stored.
If you filter/sort by a Field or any other value that value MUST exist in order for the posts to show up, otherwise the Query will not match them.

Post date always exists, so I assume your Query for the Posts that are child of some other posts is actually the problem since probably the other 9 posts are not child of that post.

What I recommend:

1. Create a minimal View, query your post type
2. Output in the Loop the Post Title only
3. Check the front end, you will now see exactly the amount of posts existing in that post type

Then, introduce one filter and sort rule a time.
Check each time the front end, and as soon the posts get less, you will know wich Query does not match some posts.
You can then either remove that Query or update your Posts to be matched.

In case you have any follow up questions, do not hesitate to consult me.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.