I’m trying to limit the content that is returned via REST API routes to only contain content published by the current logged in user. I’m trying to do this...
I have a WordPress loop, that is part of an AJAX call. Every time a button is clicked, this function is called, runs the below loop and outputs the...
I’m trying to create a plugin which adds a new custom post type and it should be shown at the same locations as a normal post (front page, archives...
I have a filter using pre_get_posts to change the number of posts per page from 4 on the news landing page to 8 on all other pages (page 2,...
Toward the top of the edit.php screens there is a list that displays post statuses along with the post count. I believe this is generated by WP_Post_List_Table::get_views. For example...
This Q is a follow up to this answer on the Q: “How to exclude a specific term for the search?”. 4 ways to filter out posts that have...
So in the template I’ve multiple featured posts and sliders and 2 default loops. I use get_posts for everything except default loops (obviously). Now the issue I’m having is...
(Moderator’s Note: The original title was “using archive by date with a custom date”) I’m adding an additional date to posts as a custom field. Now I want the...
I’m trying to create a portfolio with WordPress using a Custom Post Type to display my projects. Each project I want to display on my static front page with...
I am trying to use pre_get_posts to set posts per page for a single term within a taxonomy. One thing that is throwing me off is setting the term...