I have a very strange problem and I am stuck. I want the single page to display posts with the post_status of publish and future. So I added this...
I have a custom post type which has been made to show in archives using the code below in my theme’s functions.php : add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if...
I have a filtering nav bar on my posts page with “All” and some categories (“Strategy”, “Design and UX”, “Technology”, and “Company and Culture”) that alters the query using...
I’m using the ACF plugin to create custom fields which get applied to a custom post type (projects). In my functions.php file I am trying to use pre_get_posts to...
I am adding a default WordPress Search widget through Elementor on two of my page, page X and page Y. Page X ID = 100, page Y ID =...
How to alter query order direction using $query->set(‘order’, ‘ASC’); inside a pre_get_posts filter?
According to: http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters Default order is DESC and default orderby is date. In a custom plugin, plugin is applying the following pre_get_posts filter: function custom_search_filter($query) { //echo '<pre>'; var_dump($_GET);...
I’m trying to create a submenu page for reordering posts/pages. Right now I’m trying to include the list that display the different post statuses, for example: All (5) |...
I have created a search box with a drop down box of 4 options to customize the search: A general default search, no filter A custom search according to...
UPDATE: I have worked out my implementation of the selected answer at the bottom of this post. I’m implementing a sorting algorithm based on Reddit’s hotness algorithm, in addition...
I’m having a hard time determining the first direction to take with this. I’m trying to write a plugin that allows users to pick a location for a post...