Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1432546

    hI;
    how can i show in a preview page blog posts with a date, where an event should be on.
    I want to make on overview page for lots of events coming up in this year but in the moment, when i put in the post the date may 2024, its on the status planned and not visible. Its just showing the date when i put the post in in the moment, but that doesn`t matter.
    Isn`t there another way with the function of blog posts that these will be sorted by date of the event so everybody can see the upcoming events including blogphoto and the real date of the event in big letters ?
    Like starting by January, then February…

    You have any idea? Would be great!
    Many greetings rixi

    #1432569

    Hey rixi,

    Thank you for the inquiry.

    There is no default option for this, but you can create a custom field with the event or post date as the value. Then, add the following filter in the functions.php file to sort the items based on the value of the custom field.

    add_filter('avia_post_slide_query', 'avia_post_slide_query_mod');
    function avia_post_slide_query_mod( $query ) {
    	if( is_page(123) )
    	{
    		$query['meta_key'] = 'event_date';	
    		$query['orderby'] = 'meta_value_num';
    		$query['order'] = 'ASC';
    	}
    
    	return $query;
    }
    

    Another solution is to install an events plugins such as Events Calendar or Events Manager.

    // https://wordpress.org/plugins/the-events-calendar/
    // https://wordpress.org/plugins/events-manager/

    Best regards,
    Ismael

    #1432574

    Hi Ismael,
    thanks a lot for your quick answer!
    I will try out what is the best of the options.

    Many regards
    rixi

    #1432593

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.