Wednesday, October 16, 2024

Upcoming webinar list (WebinarPress)

Upcoming webinar list (WebinarPress)

// Upcoming webinars shortcode
function regf_display_upcoming_webinars() {
$args = array(
'post_type' => 'wswebinars',
'posts_per_page' => -1,
'meta_key' => '_wswebinar_gener_date',
'orderby' => 'meta_value',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => '_wswebinar_gener_date',
//'value' => date('Y-m-d H:i:s'), // Compare with the current date to get past webinars
'value' => date('Y-m-d'),
'compare' => '>', // Get webinars that occurred before the current date
'type' => 'DATETIME',
),
),
);

$query = new WP_Query($args);
$posts = $query->posts;

ob_start();
echo '<ul>';
echo '<h2 class="widget-title past-webinars-list-title">Upcoming Webinars</h2>';
if ($posts) {
foreach ($posts as $post) {

//echo '<a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a><br>';
$meta_values_past_date = get_post_meta($post->ID, '_wswebinar_gener_date', true);
$meta_values_vurl = get_post_meta($post->ID, '_wswebinar_livep_vidurl', true);
echo get_the_title($post->ID) . ' ('. $meta_values_past_date .')' . ' - ' . '<a href="'. get_permalink($post->ID) .'">' . 'Join webinar' . '</a>' . '<br>';
wp_reset_query();
}
}
else {
echo 'No upcoming webinar';
}
echo '</ul>';
return ob_get_clean();
}
add_shortcode('upcoming_webinars', 'regf_display_upcoming_webinars');

Past webinar list (WebinarPress)

List of past webinars:

// Past webinars shortcode
function regf_display_past_webinars() {
$args = array(
'post_type' => 'wswebinars',
'posts_per_page' => -1,
'meta_key' => '_wswebinar_gener_date',
'orderby' => 'meta_value',
'order' => 'ASC',
'meta_query' => array(
array(
'key' => '_wswebinar_gener_date',
//'value' => date('Y-m-d H:i:s'),
// Compare with the current date to get past webinars
'value' => date('Y-m-d'),
'compare' => '<',
// Get webinars that occurred before the current date
'type' => 'DATETIME',
),
),
);

$query = new WP_Query($args);
$posts = $query->posts;

ob_start();
echo '<ul>';
echo '<h2 class="widget-title">Past Webinars</h2>';
if ($posts) {
foreach ($posts as $post) {
//echo '<a href="' . get_permalink($post->ID) . '">' . get_the_title($post->ID) . '</a><br>';
$meta_values_past_date = get_post_meta($post->ID,
'_wswebinar_gener_date', true);
$meta_values_vurl = get_post_meta($post->ID,
'_wswebinar_livep_vidurl', true);
echo get_the_title($post->ID) . ' ('. $meta_values_past_date .')' . ' - '
. '<a href="'. $meta_values_vurl .'">' . 'Watch webinar' . '</a>' . '<br>';
}
}
else {
echo 'No past webinar';
}
echo '</ul>';
return ob_get_clean();
}
add_shortcode('past_webinars', 'regf_display_past_webinars');


Sunday, October 6, 2024

Suomen Kieli (Vuorokausi)

Suomen Kieli (Vuorokausi):


1. Aamu (Morning): This refers to early morning, usually around 6:00 AM to 9:00 AM.

2. Aamupäivä (Before noon): Late morning, approximately from 9:00 AM to 12:00 PM.

3. Päivä (Daytime): Midday and early afternoon, typically from 12:00 PM to 3:00 PM.

4. Iltapäivä (Afternoon): Late afternoon, usually around 3:00 PM to 6:00 PM.

5. Ilta (Evening): The evening period, from 6:00 PM to 9:00 PM.

6. (Night): Nighttime, which generally starts around 9:00 PM and continues until 6:00 AM.

7. Aamuyö (Early morning hours): Early morning hours after midnight, typically from 12:00 AM to 6:00 AM.


Upcoming webinar list (WebinarPress)

Upcoming webinar list (WebinarPress) // Upcoming webinars shortcode function regf_display_upcoming_webinars () { $args = array ( ...