Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to make a page on my blog using this plugin called Idealien Rideshare & i want to make the rides disappear after the date passes.

Plugin link http://wordpress.org/extend/plugins/idealien-rideshare/

I think the problem is with this code & i'm not sure how to resolve this. I'v tried something but the page load's very slow

Can you help me make this?

                    //Retrieve all rideshares by event

                    $queryParameters = array(

                        'post_type' => 'idealien_rideshare',

                        'posts_per_page' => '-1',

                        'orderby' => 'meta_value',

                        'meta_key' => 'idealien_rideshare_event',

                        'meta_value' => $event->name

                    );

The author of the plugin told me to change that line of code with this

$dateCompare = '>=';
$dateValue = date("m/d/Y", time());
$dateMetaQuery = array(
    'key' => 'idealien_rideshare_departureDate',
    'value' => $dateValue,
    'compare' => $dateCompare
);

if ( $dateMetaQuery ) { $meta_query[] = $dateMetaQuery; }

$queryParameters = array(
    'post_type' => 'idealien_rideshare',
    'posts_per_page' => '-1',
    'meta_query' => $meta_query,
        'orderby' => 'meta_value',
    'meta_key' => 'idealien_rideshare_event',
    'order' => 'ASC'
);

but still not working. I gave the link of the plugin, to have it & look on the full code.

Thank you & waiting all your answers.

share|improve this question

closed as too localized by Michael, Brian Fegter, kaiser, toscho Sep 22 '12 at 14:36

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.