werkgroepinternet
Forum Replies Created
-
OMG. It is done. Thanks for the suggestion, it was a bit harder than just nesting the block under it, but nevertheless: this has become the code.
<?php $bookings = array(); foreach($EM_Event->get_bookings()->bookings as $EM_Booking){ if ($EM_Booking->status == 1){ array_push($bookings, array('person_name'=>$EM_Booking->person->get_name(),'person_email'=>$EM_Booking->person->user_email,'person_phone'=>$EM_Booking->person->phone,'booking_space'=>$EM_Booking->get_spaces(),'booking_comment'=>$EM_Booking->booking_comment,'Tickets_Bookings'=>$EM_Booking->get_tickets_bookings())); } } asort($bookings); ?> <?php foreach($bookings as $EM_Booking) { ?> <tr> <td class="Name"><?php echo $EM_Booking['person_name'] ?></td> <td><?php echo $EM_Booking['person_phone'] ?></td> <td class="Ticket"><?php foreach($EM_Booking['Tickets_Bookings'] as $EM_Ticket_Booking){ echo $EM_Ticket_Booking->get_ticket()->name ; ?> <br> <?php } ?></td> <td class="Comment"><?php echo $EM_Booking['booking_comment'] ?></td> </tr> <?php } ?>
I am sorry, I forgot to include in my I initial question that I wanted to order the list of attendees alphabetically, and display the names of the tickets they bought. I’ll mark this question as resolved and start a new topic with this question.
Well, the alphabetical list on names is great, so I definitely want to keep the code you suggested. But I also want to include the tickets attendees bought in the same list, which could be displayed with the code I gave.
Is there a way to combine both codes? So the output reads alphabetical list on names of attendees with the corresponding names of the tickets they bought?
Thank you for your quick reply. The list is now alphabetical on names of the attendees. Sadly, the code for displaying the tickets of the attendees isn’t working anymore:
<?php foreach($EM_Booking->get_tickets_bookings() as $EM_Ticket_Booking): ?> <?php /* @var $EM_Ticket_Booking EM_Ticket_Booking */ echo $EM_Ticket_Booking->get_ticket()->name; ?><br><?php endforeach; ?>
Can this still be done in another way?
Forum: Themes and Templates
In reply to: [Pinnacle] Custom Template with Blog & Portfolio on same pageHaha, thanks. As stated before
I’ve done this with Page Builder by SiteOrigin, but found it to be not so good looking.
, but I’ll try to make this work then.
Thanks for your effort!
Forum: Themes and Templates
In reply to: [Pinnacle] Custom Template with Blog & Portfolio on same pageI’m sorry! I now see I have to call these files like
get_template_part('templates/content', 'fullpost');
or
get_template_part('templates/content', 'singleportfolio');
I’m a real noob, as you probably could tell already.I’m not trying to mix those posts btw, I’m trying to create a template which loops the latest blog post of a (to be set in page-settings) category in a column, and in the next column the latest portfolio post of a (to be set in page-settings) category. Something like
Latest Blog post title | Latest Portfolio title
Author date etc here | Example photo of last portfolio
Text of last post here |Forum: Themes and Templates
In reply to: [Pinnacle] Custom Template with Blog & Portfolio on same pageYeah, I already figured that out, but I’m not yet advanced enough in coding, to write the entire loop for this action.
I moved my template for multiple pages out of the pinnacle-child/templates into pinnacle-child.
However, I’m curious whether I can use the get_template_part of the templates of the Pinnacle theme, to get what I want: blog & portfolio on the same page.
Something like
<?php get_template_part('templates/content-fullpost', 'page'); get_template_part('templates/content-singleportfolio', 'page'); ?>
isn’t working. Is something like this even possible with get_template_part?
Forum: Themes and Templates
In reply to: [Pinnacle] Horizontal submenu withThanks!