Forum Replies Created

Viewing 15 replies - 256 through 270 (of 449 total)
  • Thread Starter Alkorr

    (@alkorr)

    Ok, I found a way around. I don’t use the function you gave but simply added:

    'posts_per_page' => -1

    in my query.

    It works fine, eventually. Although I wish I could use pagination 😉

    Thread Starter Alkorr

    (@alkorr)

    Well, I’m still stuck.

    I use this simple code on archove-events.php to call all events but the pagination doesn’t show either.

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    So: no way to show more than 10 events on the same page, and no way to use pagination to access the other pages.

    I added the ‘cindy’ code in my function.php but it didn’t change a thing, sorry…

    Any new idea is welcome!

    Thread Starter Alkorr

    (@alkorr)

    Thanks for your replies Stephen, I could manage to do -almost- everything I wanted. But…

    On showing all this year’s events:

    This will depend on the settings in the plug-ins ‘general tab’.

    You can indeed select ‘Show past events’ in the plugin settings but it’s not about showing all past events like events which happened in 2012, but only events which happened before today’s date, meaning (only) including January of the current year.

    On the 10 posts limitation:

    To show all events on these pages (i.e. no pagination) then you can use the above snippet. It should work, I’ve tested it :).

    It’s not a problem if only 10 events are showing on the page, I want to use pagination to see the other 10 and so on. But pagination doesn’t even show after the 10 first events, that’s the problem.

    Back on a showing this year’s events:

    If you’re after just one page with events for the current year, I would suggest using the event list shortcode: http://wp-event-organiser.com/documentation/shortcodes/event-list-shortcode/

    Or a custom page template using eo_get_events() (see docs)

    I managed to show them all using a WP Query:

    'post_type' => 'event', 'showpastevents' => true,

    It works fine and shows all events in 2013 (but only 10 posts are still showing, see previous question about it). Since I’m not using the archive-event.php template, I guess this new template I’ve created will always show this year’s events without the need to link to a hard coded year in the URL such as http://www.mywebsite.com/event/on/2013 but using a dynamic URL (i.e) http://www.mywebsite.com/event/ instead.

    So now the remaining problem is the list showing only 10 posts, without showing any pagination.

    Thanks again!

    Thread Starter Alkorr

    (@alkorr)

    I haave modified the apostrophe at first, but it was the PHP I had to add on 1st line and last (and in between) that I got wrong.

    Works fine now, thanks again! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Ok, the page archive works fine now, but it’s only showing 10 events.

    I added the code in my function.php:

    add_action( 'pre_get_posts', 'cindy_show_all_events' );
     function cindy_show_all_events( $query ){
          if( $query->is_main_query() && 'event' == $query->get( 'post_type' ) ){
                   $query->set( 'posts_per_page', -1 );
          }
     }

    But only 10 events are still showing. Plus, the page only shows upcoming events while I would like to show all events (past and future) in 2013.

    I could use archive-event.php since the page shows all events (yearly) on a single page (why doesn’t it only show ten then paginate?) but this archive only shows upcoming events and not all events from 2013 (including past ones).

    Plus, I will have to link directly to the exact year (/2013/) instead of a dynamic page with only events of the current year.

    How can I do that? Thanks!

    Thread Starter Alkorr

    (@alkorr)

    Hi Stephen, here is what I tried:

    <?php
    
    global $eo_event_loop,$eo_event_loop_args;
    
    //Date % Time format for events
    $date_format = get_option('date_format');
    $time_format = get_option('time_format');
    
    //The list ID / classes
    $id = $eo_event_loop_args['id'];
    $class = $eo_event_loop_args['class'];
    
    ?>
    
    <?php if( $eo_event_loop->have_posts() ): ?>
    
    		<?php while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post(); ?>
    
    			<?php
    				//Generate HTML classes for this event
    				$eo_event_classes = eo_get_event_classes(); 
    
    				//For non-all-day events, include time format
    				$format = ( eo_is_all_day() ? $date_format : $date_format.' '.$time_format );
    			?>

    And then call the title and thumbnail but I get an error:

    Fatal error: Call to a member function have_posts() on a non-object in…

    Since ‘Events’ is a taxonomy, why isn’t it possible to list all the posts from that taxonomy?

    Very quick answer, works perfectly, thank you! 🙂

    Hi Stephen, may I dare ask for full calendar please?

    I tried:

    .eo_calendar td.today{
    background: #d8d8d8 !important;
    }

    But it didn’t work…

    Thread Starter Alkorr

    (@alkorr)

    It helped A LOT, thank you Stephen!

    Your plugin is awesome, really. Your documentation is as huge as your plugin is, but once you -begin to- understand how things work, you can do exactly what you want with it.

    Thanks again! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Ok, understood, took me some time to get it right but it works fine now. Thank you Stephen!

    Thread Starter Alkorr

    (@alkorr)

    Thanks a lot for your help esmi.

    But now I’m stuck with the featured image and I can’t manage it as I would be able to do if I used the first image inserted into the post.

    I may have approached this the wrong way at first but WP making mandatory to use a featured image to use thumbnail (not mentioning attached images) is way more complicated. Like this thread proves it.

    Anyway, by default all the featured images will float left since I can’t choose from the Admin. Not very fexible but now I edited all my posts, I’ll have to stick with it!

    Thanks again esmi 😉

    Thread Starter Alkorr

    (@alkorr)

    I don’t why but now the shortcode is working again:

    <?php echo do_shortcode(‘[eo_events]
    %event_title%
    %start{d F Y}{g:i:a}%
    [/eo_events]’); ?>

    Unfortunately, I can’t get rid of the ul li stuff…

    Like I said, I can’t use the [eo_events] shortcode ‘as is’ because I need to show the title then below the date/time so which template can I edit if not templates/shortcode-event-list.php?

    Thread Starter Alkorr

    (@alkorr)

    Cool! Event Organiser is a great plugin (still trying to make my [eo_event] shortcode list work BTW).

    Now I can choose the Event Organiser, thank you very much!

    Thread Starter Alkorr

    (@alkorr)

    Hi Stephen. Unfortunately, Organiser is checked in the Screen Options but the box doesn’t show… Any idea why?

    Thread Starter Alkorr

    (@alkorr)

    No, esmi, it’s not. I can handle the featured to float right or left in my theme’s CSS but that’s not what I’m looking for.

    I want to be able to choose for a specific post to float the featured image right, and for another one, to float it left. Which means I could do that from the admin but there is no way to add any CSS directly from the post for a featured image (but it is when inserting an image within a post…).

    Apparently, that’s something impossible using a featured image.

Viewing 15 replies - 256 through 270 (of 449 total)