Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter delflux

    (@delflux)

    They also have this code on their site which shows you how to do custom sorting for the slider:

    /**
     * Modify sort method for WordPress post based SlideDecks
     *
     * @param array $query_args The Array of query arguments passed to WP_Query
     *                          (http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters)
     * @param array $slidedeck The PHP Array that describes the SlideDeck being rendered
     *
     * @return array
     */
    function slidedeck_posts_slidedeck_query_args( $query_args, $slidedeck ) {
        // Check to see if the SlideDeck being rendered is ID 1451
        if( $slidedeck['id'] == 1451 ) {
            // Set the orderby value to use the "meta_value"
            $query_args['orderby'] = "meta_value";
            // Set the meta_key to use to "event_date", this should be the meta_key name you want to sort by
            $query_args['meta_key'] = "event_date";
            // The direction you wish to sort (ASC|DESC)
            $query_args['order'] = 'ASC';
        } 
    
        // Always return $query_args, even if you aren't modifying it or you will break things
        return $query_args;
    }
    // Hook into the slidedeck_posts_slidedeck_query_args filter and specify a priority of
    // 10 (default) and receiving 2 query arguments, so we get information about the SlideDeck
    add_filter( 'slidedeck_posts_slidedeck_query_args', 'slidedeck_posts_slidedeck_query_args', 10, 2 );

    I would like to know how to tie that code into the event Start Date on The Events Calendar.

    Thread Starter delflux

    (@delflux)

    I actually ended up removing Nextgen and used Jetpacks Gallery instead.

    @tizz – I get what you’re saying but you have to create a page manually instead of it being automatically generated based on whatever gallery you click on in the album listing.

    but…when you display an album listing with all the galleries being listed on a page/post and click on a gallery, it takes you to that gallery on a new page. The title of that gallery isn’t displayed on the new page, just the album title…so you don’t know what gallery you’re actually looking at.

    Their used to be workarounds on the older versions of Nextgen but they don’t work on the new versions.

    Thread Starter delflux

    (@delflux)

    @tizz – Yes. I knew that but it would be nice to have it display the gallery title name on the generated gallery thumbnail pages. Just another confusing step especially for someone who isn’t very knowledgeable with WordPress.

    Yes! I I need help with this as well.

    Thread Starter delflux

    (@delflux)

    I figured out a solution. Just added an else statement to the widget function.

    else {
    echo $before_widget.$before_title.$instance['title'].$after_title;
    echo '<p>No upcoming events</p>';
    }
Viewing 5 replies - 1 through 5 (of 5 total)