BingoBingo
Forum Replies Created
-
Thanks you very much
IngoWow, thank you for your thoughts …!!
Unfortunately, we are playing in a different league. I’m just a hobbyist and I made the site with a lot of effort.
Your ideas seem very plausible to me. But it would take me a long, long time to realize that. So I try to adapt existing code. The people need short-term the list. That’s all.
Yes, $ EM_Event is probably empty and probably can not display a date.Thank you very much!!
Hello Patrick
I have events with up to three speakers (Referent1, Referent2, Referent3). I would like a list of all speakers and their events with date.
Speaker A; Event c; 2016-02-11
Speaker A; Event g; 2017-03-02
Speaker B; Event c; 2016-02-11
…
Output on screen or in a fileecho ‘
'; print_r ($ EM_Event); '</ pre>' has an effect, see here: https://aktionskreis-energie.de/referenten-events/ My code:
function Ref_event_list(){ $RListe=''; $args = array( 'meta_key' => 'last_name', 'order' => 'ASC', 'orderby' => 'meta_value', 'meta_query' => array( array( 'key' => 'referent', 'value' => 'true', 'compare' => '=', ), ), ); $user_query = new WP_User_Query( $args ); if ( ! empty( $user_query->results ) ) { foreach ( $user_query->results as $Referenten) { $args = array( 'post_type' => 'event', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'Referent1', 'value' => $Referenten->id, 'compare' => '=', ), array( 'key' => 'Referent2', 'value' => $Referenten->id, 'compare' => '=', ), array( 'key' => 'Referent3', 'value' => $Referenten->id, 'compare' => '=', ) ) ); // The Query $query = new WP_Query( $args ); $RListe=$RListe .'<div>'; while($query->have_posts()):// The Loop $query->next_post(); global $EM_Event; $id = $query->post->ID; echo $EM_Event->start_date; $RListe=$RListe .$Referenten->titel_dr.'; ' .$Referenten->first_name .'; ' .$Referenten->last_name ;// the speaker $RListe=$RListe .'; ' .get_the_title($id) .'; ' .$EM_Event->start_date .'</br>'; echo '<pre>'; print_r($EM_Event); '</pre>'; endwhile; wp_reset_postdata();// Reset Post Data $RListe=$RListe .'</div>'; } } return $RListe; }
I call the object in the query. And I placed the output in two places. Now no date is displayed
….
$args = array(
‘post_type’ => ‘event’,
‘meta_query’ => array(
‘relation’ => ‘OR’,
array(
‘key’ => ‘Referent1’,
‘value’ => $Referenten->id,
‘compare’ => ‘=’,
),
array(
‘key’ => ‘Referent2’,
‘value’ => $Referenten->id,
‘compare’ => ‘=’,
),
….
)
)
);$query = new WP_Query( $args );
$RListe=$RListe .'<div>’;while($query->have_posts()):
$query->next_post();
$id = $query->post->ID;
global $EM_Event;
echo $EM_Event->start_date;$RListe=$RListe .get_the_title($id) .’; ‘ .$EM_Event->start_date .'</br>’;
endwhile;
….
Thank you very much
I have adapted the code (see below). But it will always show 01-01-1970 for each event and not the date of the event.
global $EM_Event;
….$args = array(
‘post_type’ => ‘event’,
‘meta_query’ => array(
‘relation’ => ‘OR’,
array(
‘key’ => ‘Referent1’,
‘value’ => $Referenten->id,
‘compare’ => ‘=’,
),
array(
‘key’ => ‘Referent2’,
‘value’ => $Referenten->id,
‘compare’ => ‘=’,
),
….
)
)
);$query = new WP_Query( $args );
$RListe=$RListe .'<div>’;while($query->have_posts()):
$query->next_post();
$id = $query->post->ID;
…
$RListe=$RListe .’; ‘ .get_the_title($id) .date_i18n(“d-m-Y”, $EM_Event->start_date) .'</br>’;endwhile;
….
… that would be great!!
Forum: Plugins
In reply to: [RSS Feed Widget] Random posts from the feed?? ??
That is what I want!!
Thank you very much!!!Forum: Plugins
In reply to: [RSS Feed Widget] Random posts from the feedI hope now it is clearer:
In my current feed file (https://ingo-diedrich.de/feed) the last 10 posts are displayed. When I enter 3 posts in the RSS feed widget, the last three are always displayed. Only the last 3 are sorted differently.
I want that every post from the feed file can belong to the 3 displayed.Problem with the slider and Firefox 59:
https://github.com/stevenwanderski/bxslider-4/issues/1188Excuse my english
Forum: Plugins
In reply to: [RSS Feed Widget] Random posts from the feedThat’s a great service! Many Thanks!
So the last five posts are sorted randomly. That’s nice.
But I would like to give old posts a chance: five posts should be randomly selected from the feed. Not the last five, but any. Is it possible?By the way: the link in the slider does not work on Firefox 59.
Thank you very much for your help.
IngoForum: Plugins
In reply to: [RSS Feed Widget] Random posts from the feedThat would be very nice!!
Is my question stupid or is there no answer?
I would be very grateful for your help
Thank you
Forum: Plugins
In reply to: [Download Manager] captcha with two downloadswhen I reload the post, it works
Hello bradvin
It works!
Thank you very much
Anyone?
Many thanks for the answer!
I know the plugin generator. But it creates a new template. I want to customize an existing template. Is that possible?