Thank you, Jacob your suggestion put me into the right direction.
This resolved the issue:
<a href="https://wordpress.stackexchange.com/questions/292724/?orderby=title&order=ASC">Sort By Title</a>
<a href="?orderby=date&order=DESC">Sort By Date</a>
How can I upvote or add +rep you on here? thanks again bro 🙂
Related Posts:
- If specific user role then sticky post
- How can I remove posts of a certain category from homepage after a specified time period?
- Change post order random through out the entire WordPress
- How to filter my search in post if contains a word in title, content or excerpt?
- How do I display main query posts in random order using add_filter
- the wp_post_update isn’t working all the time
- Display/Filter post using if else statement
- long-title posts do not want published
- Override wp_link_pages pagebreak with filter
- Get results from the main wp_query
- Add custom PHP (no-SQL) filter to WP_query
- Filters do not work when there are multiple (one works)
- How to limit the number of posts that WP_Query gets?
- Random sort within an already sorted query
- Search by Hyphen
- Exclude drafts in all() view of edit.php
- How to publish a post with empty title and empty content?
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- How to query posts with current or future date only
- WordPress Number of Posts Not Changing With posts_per_page
- Create new WordPress post [wp_insert_post] based on results of a WP_Query
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Display the latest posts, published in the last hour, with WP_Query
- Custom Order in WP Query
- Fetch posts from current week (Sunday to Saturday)
- Search query – exact post title match
- Converting multiple loops into one single loop with pagination
- How would I get 1 latest post from a query for 5 posts?
- Getting post id from wp_insert_post_data function?
- How to get most recent commented post above new submitted post in WordPress?
- How can i do something after head like adding a hook for after head but before post
- Exclude posts with empty post_content in wp_query
- Exclude posts from featuring
- Lazy Load using WP_Query pagination
- Only display a certain number of posts, dependent on how many posts there are available in a query
- AJAX filter posts by year
- Automatic post deletion
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Yearly archive page for future year
- How can I show many posts an author has per week?
- Ajax load more button in Recent posts widget
- WP_Query orderby not working with meta_value_num and menu_order
- Custom WP_Query with complex ‘post_status’ argument
- is there a way to show the the post title after the image?
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- Blog post per page setting conflicting with custom WP_Query?
- How to exclude latest x posts from a paginated query?
- Default to ‘all’ view on the ‘edit-post’ screen for authors
- Ajaxify This Code
- Select only post id and meta value with WP_Query
- Query Posts by Custom Field
- How do I extract just the post ID of the first item in whatever WP_Query returns?
- Show post content and title in diferent divs using WP_Query using a loop
- Is it possible to filter the main loop to exclude posts from a specific category?
- Loop doesn’t exclude the specified category in home page
- How to get posts published on the latest date?
- Page and post loop same template
- Modify posts listing at back end
- Show metabox value last post excerpt, title and link
- How do I insert a after every 5 posts in a WordPress Loop that infinitely loads posts?
- How include css class based on post ( in loop ) slug?
- WordPress Loop: How to display recent posts in multiple divs
- Random posts that always include a particular post?
- Related Posts function not working
- Conflict array_splice on loop and query in widget
- wp_query if have posts show date but not in loop
- Exists filter or action that change Add New Post link?
- Custom WP_Query not working correctly
- Echo the number of posts being displayed
- Creating a related posts section in wordpress inside a default post
- Change content off every sixth element
- Rewrite image links from attachment id to attachment link
- While loop in functions.php outputting the_title() of each post on frontpage
- Why sorting posts doesn’t work properly?
- How to create loop of posts except post ID defined via ACF field
- how to filter posts by category without page load (ajax) in wordpress?
- Display specific posts based on an ID of another post
- Change URL of previous posts and next posts link in WordPress
- Remove status ‘archived’ from the default post and page view
- How to invoke a HTML custom button based on a HTML dropdownlist menu
- Dropdown Select Post Filter
- Mix post date with post meta value using WP_Query
- How do i search post by jquery datepicker?
- Fill the exclude array() in get_posts()
- show only one category and filter by tag
- The first post appears twice
- WP_Query sort by meta_value_num or date
- Prevent WordPress from putting around specific element
- Displaying a specific sub-category’s posts from wp_query
- Custom layout manager for posts
- Filter question list on substring of metavalue
- Add review box by function at top or bottom of content
- Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?
- Pagination for custom query won’t let me back on page 1
- Can’t get pagination to work
- How to get single post by one author?
- List posts related to category on a div [closed]
- Wp_query WooCommerce products
- posts_per_page – Repeats only first posts ‘post__in’ array
- query_posts different amount of posts per page [duplicate]