Forum Replies Created
-
AuthorPosts
-
titusrajParticipant
This reply is private.
titusrajParticipantcan you please refer to another support engineer and see if they have a different code that might work.
Basically need to make the front page random, or ideally the latest additions. I am stuck with the same photo front page now and if it is a long event, it just stays on the front page.
titusrajParticipantStrange , I have tried with twenty seventeen, have you tried this on a live environment on a different server?
titusrajParticipantI am only using events calendar plugins ! Unless there is a conflict within your plugins.
Host is siteground, which is very good.
Have purged the cache.
Still does not work.
Will request again in a few months to see if there is any other solution.
TitustitusrajParticipantHi Sky,
Site is set up with Main Events Page as Home Page.
I am sure I have been pasting in the correct place.
Which word do I replace with “true”
Titus
titusrajParticipantHi Sky,
Unfortunately that did not work.
Lets forget random.
What about latest post on front page photo view?
Can this be done, I think it will be very useful to keep the site looking good with fresh content every time someone visits.
Maybe you can check with the guys who have worked with the plugin for a longer period.
Titus
titusrajParticipantHi Sky,
Do you meant this code?
Titus
<?php
/*
* Reorder events so that the ones that are running over a long period
* show up at the bottom of the list in a given view
*/
add_action( ‘pre_get_posts’, ‘push_older_events_to_bottom’, 500 );
function push_older_events_to_bottom( $query ) {
if ( is_front_page() ) {
$query->set( ‘orderby’, ‘meta_value’ );
$query->set( ‘meta_key’, ‘_EventStartDate’ );
$query->set( ‘order’, ‘DESC’ );
}
return $query;
}titusrajParticipantHI Sky,
This is how it is set up
This is the code added
Unfortunately no result.
Titus
titusrajParticipantHi Sky.
I deactivated all plugins
https://snag.gy/tvOK1N.jpgUsed twenty seventeen theme
Added the code on themes functions
https://snag.gy/BgMESw.jpgPurge the Cache
Still same result
titusrajParticipantUnfortunately that did not work at all, in any case I have left the code there for you to have a look.
titusrajParticipantHi Sky,
I have tried, there are no changes. The code only works in it’s original form.
Would you like my username and password to try?
Titus
titusrajParticipantUnfortunately EventEndDate? did not work at all.
titusrajParticipantExample, an event that started in August 25th but goes on to August 30th don’t show on any page with a photo view.
Events that start on Ausgust 27th (Today) and August 28th (tomorrow and beyond ) show up.titusrajParticipantHi Sky,
Not past events but events that are current, but started in the past from
today. Basically events that started before today but are still going on,
those disappear.titusrajParticipantHi Sky,
Thanks for this.
Problem with this code is, the events that start before today, don’t show at all in photo view which is my front page.
Titus
-
AuthorPosts