Prateek

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Prateek
    Participant

    Hi Jonah,
    The New code works fine form me except for new issue, the ‘orderby’=>’DESC’, is not working. It will be great if you can tell me where i am wrong

    Here is my code:

    global $post;
    $current_date = date(‘j M Y’);
    $end_date = date(‘j M Y’, strtotime(‘-730 days’));

    $get_posts = tribe_get_events(
    array(
    ‘start_date’=>$current_date,
    ‘end_date’=>$end_date,
    ‘posts_per_page’=>-1,
    ‘orderby’=>’DESC’,
    ‘tax_query’=> array(
    array(
    ‘taxonomy’ => ‘tribe_events_cat’,
    ‘field’ => ‘slug’,
    ‘terms’ => ‘150-anniversary’
    )
    )
    ) );

    foreach($get_posts as $post) { setup_postdata($post); ?>

    Prateek
    Participant

    Thanks for you quick response Barry. The :first-child in CSS will be a good idea but here it won’t work as I will not have control over the Featured Event.

    Thanks Again for your help I will create another thread for excluding a category.

    Prateek
    Participant

    Hi Barry,
    I am using 2 widgets,
    1) Next Event Widget to show the Featured upcoming Event
    2) Event List advance widget to show the normal upcoming events.
    Is there any simplest way to do so? I have created 2 categories Featured and Normal and I am trying to exclude the Featured events to get repeat in normal category. In this way I am facing problem I can’t pre select anything as whatever I select as Featured get omitted from the Normal.

Viewing 3 posts - 1 through 3 (of 3 total)