Support » Developing with WordPress » Sort post navigation on meta value

  • Hi,

    Sorry if my English is not very best 😉

    On my WordPress website I work with events, the events has a start date and a end date. When you’re on a single post (a event) there is a navigation (previous and next link) on the bottom of the post.
    I want that they are sorted on the start date (meta value).

    Is that possible?

    To make it more clear, here is example that I use to show the first events:
    As you can see in the example (above), the events are sorted as the meta value in the meta key “datum_start”.

    If anyone can help me… thanks!


Viewing 1 replies (of 1 total)
  • ramon fincken


    Have you seen this or this ?

    Update: do you have a loop? Can you post the PHP code of that template?

    Could you try something like this?

    		// Pepare WP :)
    		$query_array = array (
    			'post_type' => 'post', 'orderby' => 'date',
    			'paged' => intval(get_query_var('paged')));

Viewing 1 replies (of 1 total)
  • The topic ‘Sort post navigation on meta value’ is closed to new replies.