Marion

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • Marion
    Participant

    Hi Leah,

    thanks for your info, hoping that it will be fixed in on of the next updates…

    Best
    Marion

    in reply to: order of events: showing events by post date #1084437
    Marion
    Participant

    .. it seemed actually just an easy request and it turned out to be so tricky 😉

    Do you have a kind of an example link/snippet? That would be great…

    Thank you Josh,
    Marion

    in reply to: order of events: showing events by post date #1083766
    Marion
    Participant

    Hi Josh,

    unfortunately this does not work:

    <?php 
    global $post;
    
    $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    
    	  $all_events = tribe_get_events(array(
    	  'eventDisplay'=>'upcoming',
      	  'suppress_filters' => true,
          'post_type' => 'tribe_events',
          'order'    => 'DESC',
          'posts_per_page' => 30,
          'paged' => $paged,
          'page' => $paged
        ));
    
    foreach($all_events as $post) { 
    		setup_postdata($post);
    ?>
    
        <!-- the loop -->

    When I erase ‘suppress_filters’ => true it works, but then again the order is not the way I want it to be (by post date not event date).

    I really like to solve this, any more ideas?

    Kind regards Marion

    Marion
    Participant

    Hi Hunter,

    thanks for you reply and for forwarding this.

    But actually this is quite disappointing, because an important function does not work, I really would like to know a more concrete time, when this bug will be resolved? Like this I always have to make an assumption which category the user wanted and have to edit every single user-submitted post to add the the category :/

    Marion

    Marion
    Participant

    Hi Hunter,

    ok, I am looking forward to your new answer, have a nice weekend, too!

    in reply to: order of events: showing events by post date #1082680
    Marion
    Participant

    Hi Josh,

    this is my new code:

    <?php 
    global $post;
    
    $paged = ( get_query_var('page') ) ? get_query_var('page') : 1;
    
          $all_events = tribe_get_events(array(
          'suppress_filters' => true,
          'post_type' => 'tribe_events',
          'order'    => 'DESC',
          'posts_per_page' => 30,
          'paged' => $paged,
          'page' => $paged
        ));
    
    foreach($all_events as $post) { 
    		setup_postdata($post);
    ?>
    
    <!-- the loop -->
    <article class="grid-item">
    ...
    <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?> &rang;</a>
    </article>
    <!-- end of the loop -->
        
    <?php } //endforeach ?>
    <?php wp_reset_query(); ?> 
    

    Is it the way you were talking about?
    And I think it its working like I want, still have to to some testing.

    But ( I am sorry, that there is another but): is it possible only to query the future events?

    Have a nice weekend
    Marion

    Marion
    Participant

    Hello Hunter,

    here comes the problem in short (more or less 😉 :

    functions.php: I uncommented my customizations,

    -> so at the moment only title + content are required by default

    1. case) If a user fills in everything the right way, required fields title + content set,
    selects at least one category and uploads an image:
    result: image gets transmitted, category not!

    2. case) If a user does not fill in one of the by default required fields, but hast an image already uploaded:
    result: error message (please fill in required field(s)) and image is not saved any more and has to be uploaded again AND category gets also not transmitted via community event formular like in 1. case

    So beside the problem that a user has to upload an image again, if on required field is not set, the selected category gets not transmitted via the formulae anymore 🙁

    Do you have a solution for this bug? I think it is one and the plugin does not work like it should…

    Kind regards
    Marion

    Marion
    Participant

    .. using the provided solution for the dates worked for me like in the previous post.

    Maybe there is a similar one for the »image reset after error message«?

    Marion
    Participant

    .. and unfortunately also the dates are not being stored! :/

    like in this post:
    https://theeventscalendar.com/support/forums/topic/bug-event-start-date-end-date-reset-when-errors-returned/

    M.

    Marion
    Participant

    Hi Hunter,

    the image upload issue occurs now always.

    I can uncomment this in my functions.php:

    /* organizer fields in pinn-formular 
    add_filter( 'tribe_events_community_required_fields', 'my_community_required_fields', 10, 1 );
    
    function my_community_required_fields( $fields ) {
    	$fields = array(
    		'post_title',
    		'post_content',
    		'organizer',
    		//'tax_input',
    	);
    	return $fields;
    }
    
    add_filter( 'tribe_events_community_required_fields', 'tribe_ommunity_required_fields_org_email', 10, 1 );
    function tribe_ommunity_required_fields_org_email( $fields ) {
         
        $required_email = $_POST['organizer']['Email'];
         
        foreach( $required_email as $email) {
            if ( empty( $email ) )
                $fields[] = 'Absender E-Mail';
        }
         
        return $fields;
    }
    
    */

    But Title and Content is required by default (and I like it this way), and if someone does not fill in a title or text for the content-field, the error message occurs – thats right – but the image disappears. Its not visible anymore beside the upload-button and does not get stored within the submission-form…

    Hoping you know how to resolve this..
    Marion

    Marion
    Participant

    This reply is private.

    in reply to: order of events: showing events by post date #1075074
    Marion
    Participant

    Hi Josh.

    thank you so much for your research and new solution! I will get into it by tomorrow and let you know if it works!

    Marion

    in reply to: order of events: showing events by post date #1073572
    Marion
    Participant

    Hi Josh,

    sorry for being a bit pushy, but do you already know something new?

    Marion

    in reply to: order of events: showing events by post date #1071629
    Marion
    Participant

    Hi Josh,

    yes, the default view is the list view, (I have enabled list and day view).

    The Layout of the site is a masonry-style-grid, I added a script for making this happen.

    So, the thing is, that the website is more like a news-board than an event-calendar. Its important for the users to see at the beginning of the site (grid), if there are new posts.
    At the moment, the new ones are at the bottom of the website, and in case a user does not notice, one might think “oh, there are no new posts, I will quit looking around..”.

    Thats why the date of posting is so important and not the date/period of the posted event.

    I think, it does not have to be just a reverse order, because there may be posts, that are posted today and will take place tomorrow or will take place in 3 weeks, either/or the post should be at the very beginning of the site, because it is posted today.

    Does this make sense to you?

    Marion

    in reply to: order of events: showing events by post date #1068482
    Marion
    Participant

    Hi Josh,

    thanks again for your answer, I am looking forward to your new idea 🙂

    Marion

Viewing 15 posts - 1 through 15 (of 20 total)