I’m trying to write a loop that excludes posts that don’t have attachments in their content areas. I’ve got 200 posts in a custom post type called “students”. I...
While following this article to get tags by date, I was wondering if I could exclude certain tags from what gets returned. The point is to have trending tags...
Need help with a wordpress-task I want ALL the posts from sub categories to be excluded. Example: Cake Pie Apple Pear Banana If i post a post in Banana,...
I’m using REST API to load a several posts from other site, each post must belong to a different category. However I have one “Featured events” category, that includes...
I’m try to exclude a specific category from a list of categories that a custom post has (in this case ‘Uncategorized’ – ID: 1). I’ve tried exclude: wp_list_categories([ 'include'...
I’m trying to get a list of posts from one category, echo the title and the permalink of all posts on that category but exclude the permalink and the...
I recently ha a use case where I needed to prevent a certain category from being displayed in the front-end. In detail I needed to exclude posts assigned to...
I have the following working code for a query on a specific category and tag slug: $args = array( 'category_name' => $cat_name, 'tag' => $tag_name, 'post__not_in' => $sticky );...
I am creating a website. There is a column for latest updates. This is the code that i have now. I don’t really good in php coding. Would like...
Here’s the query i have used. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query('order=asc&orderby=meta_value&meta_key=date&posts_per_page=6&paged=' . $paged); ?> Is there any way to skip the first...