Forum Replies Created
-
AuthorPosts
-
KathrynParticipant
sorted it thanks
KathrynParticipantThe line is now working thanks – just re uploaded my function php file and added your code and it still isnt working ?
KathrynParticipantI had a piece of code from you that meant when a post was published on that day – eg if the event was published on 7th July 2014 but the day of the event -and it was working absolutely fine then all of a sudden it isnt working – not sure why ??
This was the code I was given
add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );
function tribe_post_date_ordering( $query ) {
if ( $query->tribe_is_multi_posttype) {
remove_filter( ‘posts_fields’, array( ‘TribeEventsQuery’, ‘multi_type_posts_fields’ ) );
$query->set( ‘order’, ‘DESC’ );
}
}Thanks
KathrynParticipantJust clicked on the web link I have just added and it goes to the wrong page here it is http://www.letsgoloco.co.uk/
KathrynParticipanthttp://www.letsgoloco.co.uk/- here is the site Nico
You will notice that the events are not in order of date of production but date of event – I added the following code in ages ago and it was working fine until last week when it reverted back to how it is now – this has been copied from my theme functions php file any idea what is wrong ??
return $field;
}
add_filter(‘acf/load_field/name=promotions’, ‘tdp_restrict_custom_field’);
add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );
function tribe_post_date_ordering( $query ) {
if ( $query->tribe_is_multi_posttype) {
remove_filter( ‘posts_fields’, array( ‘TribeEventsQuery’, ‘multi_type_posts_fields’ ) );
$query->set( ‘order’, ‘DESC’ );
}
}
ThanksKathrynParticipantHI if you give me an email address I will set you up as an admin user so you can go in and view
KathrynParticipantSorry I hadnt responded
If you take a look at http://www.100percentplussize.com look under each blog post there is a small line which divides each post – when the events come into a blog loop that doesnt appear so each one is close to another – cant show you on http://www.letsgoloco.co.uk as the site is having a problem
-
AuthorPosts