Adam

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: Homepage customization / including upcoming and past events #11168
    Adam
    Member

    So sorry Jonah, looks like your code is indeed working like a charm! I jumped to a wrong conclusion when I was checking the page. It’s fine! Thanks again!

    (BTW I do have the query in there on line 66… this is for a different page, a newsletter that only lists upcoming events.)

    All the best!

    in reply to: Homepage customization / including upcoming and past events #11157
    Adam
    Member

    Thanks again Jonah! However, I’m trying to utilize your code and it simply returns all upcoming events, not just the ones in (in this case) the “selected” category. I tried:


    $upcoming = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1, 'tax_query'=>array(array('taxonomy'=>'tribe_events_cat','field'=>'id','terms'=>5))));

    Where the category is #5.

    I also tried this based on the codex article, using “array (‘name-of-category’)”:


    $upcoming = tribe_get_events( array('eventDisplay'=>'upcoming', 'posts_per_page'=>-1, 'tax_query'=>array(array('taxonomy'=>'tribe_events_cat','field'=>'id','terms'=>array ('selected')))));

    But that provides no results at all.

    Just for fun, here’s a link to the entire code: http://pastebin.com/zRk8YKU8

    And the page in question: http://designerblowout.ca/mailout-selected

    Hope you can point me toward my error! 8^)

    in reply to: Homepage customization / including upcoming and past events #11075
    Adam
    Member

    Thanks a million Jonah! Figures it would be something totally minor like that. D’OH!

    That leaves only one roadblock remaining for me: can you advise on how to query for events that are in particular categories? I’ve defined “featured” and “mailout” categories, for example – both used in custom templates I created for newsletter mailouts. In the previous version of the plugin I could just query_posts for posts checked with these categories. How can I specify that now?

    in reply to: Homepage customization / including upcoming and past events #11054
    Adam
    Member

    Thanks Rob for the quick reply. I totally get that you guys have limited resources and definitely appreciate the help you are able to provide. I’ll sit tight and wait for some more assistance.

    Hopefully down the road much of this can be included in the documentation – along with nice clear example PHP code… assuming that my situation is just a matter of learning “how to” and isn’t some kind of bug or technical problem (hope not!).

    Again, many thanks and looking forward to getting this sorted out.

    in reply to: Homepage customization / including upcoming and past events #11032
    Adam
    Member

    Hey… guys. My client’s limping along with a broken 1.6.5 site and I REALLY need your help to get 2.0.1 working.

    To reiterate where I’m at now, I just need the “full” code (fragments without context are not really helpful) to loop twice through events, once showing upcoming events and once showing past events. As well, I need to be able to display posts from particular categories on various e-newsletter templates.

    For the first issue, I tried (as an alternate to what’s in the pastebin link above) copying the entire code from list.php into my home.php page to grab upcoming events, but there it tells me “no upcoming events”. When I go to the regular link for upcoming events though, I do see the correct list.

    FYI, I am trying to learn what I can on my own – I found this article very promising, but at the end I still don’t know why my two loops are producing the same results:

    http://digwp.com/2011/05/loops/

    Five minutes of your undivided attention would be all it takes, I’m sure. I can also be available any time for a quick email or phone exchange. Let me know. I’m really in a corner here. Thanks!

    in reply to: Homepage customization / including upcoming and past events #11006
    Adam
    Member

    Thanks John – but the issue is actually that the upcoming and past events loops show the same events, no difference in the output. (I think I made some tweaks to the code since the time when that was the issue…)

    Here is the code:

    http://pastebin.com/5yrfpesH

    And here is what shows up:

    http://designerblowout.ca/blowout

    in reply to: Homepage customization / including upcoming and past events #10979
    Adam
    Member

    One other addendum I realized I should mention sooner rather than later: my understanding is that getting posts this way produces “static” posts, i.e. they lack pagination. But I did have (and need) this for the homepage so people can click back and see that there is a rich history of events. This was no problem with query_posts, but can I also have that with the $upcoming and $past queries?

    in reply to: Homepage customization / including upcoming and past events #10912
    Adam
    Member

    Since I know this is going to come up, perhaps I should mention now that once the front page loops are working, I also need to replicate one other kind of loop I was using before – on certain pages, intended for e-mailouts, where I extract only upcoming events in particular categories. It was all based on the old “standard” query_posts code but I can tell that it won’t work that way now (though my custom categories are still there, and ready to be checked, on Event posts). So if I can also get direction on how to show only upcoming events from a particular category, that would be great. Thanks!

    in reply to: Homepage customization / including upcoming and past events #10911
    Adam
    Member

    Thanks so much Rob. My client is getting super-antsy!

    in reply to: Homepage customization / including upcoming and past events #10883
    Adam
    Member

    OK, sorry for the last 2 extraneous posts but here is my NEW, most successful attempt; however, I’m still getting only the same, past events in both loops:

    http://pastebin.com/2FYqAbgk

    Here is how it looks:

    http://designerblowout.ca/blowout/

    I’ve created a new event in December but it doesn’t show up….

    Thanks again!
    adam

    in reply to: Homepage customization / including upcoming and past events #10880
    Adam
    Member

    Whoa, that code didn’t paste very well. Here it is on Pastebin:

    http://pastebin.com/RJ308YB8

    in reply to: Homepage customization / including upcoming and past events #10879
    Adam
    Member

    Hmm, my “THANK YOU!” was meant to be exuberant but now looks more passive-aggressive… anyhoo, I’ve had a whack at it but nothing’s happening…. here is my no-doubt-totally-muddled attempt… can you point me in the right direction? Thanks!

    ’past’) );
    $custom_posts = get_posts($past);
    foreach($custom_posts as $post) : setup_postdata($post); ?>

    <?php the_title('‘, ‘‘); ?>

    <?php
    if ( has_post_thumbnail() ) {
    echo '‘;
    the_post_thumbnail(‘listingThumb’);
    echo ‘
    ‘;
    the_excerpt();
    } else {
    echo the_excerpt();
    }
    ?>

    in reply to: Homepage customization / including upcoming and past events #10838
    Adam
    Member

    Thanks John! However, I just need a tiny bit more help to implement this as I don’t yet know what to do with these isolated snippets. I’ve only really used query_posts up to now and don’t know the syntax for custom queries. I did an online search, but see lots of VERY different approaches – using WP_Query, a “Custom Select Query”, etc.

    I’m going to have to finally settle in with a good WP book and dig deep into these sorts of beyond-the-basics customizations. But in the meantime… could you kindly share the full code for getting my excerpts?

    THANK YOU!

    in reply to: Homepage customization / including upcoming and past events #10776
    Adam
    Member

    No worries, thanks for the swift update!

    in reply to: Homepage customization / including upcoming and past events #10758
    Adam
    Member

    Hey Rob – any chance of some feedback over the next day or so? Thanks!

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