4
votes
1answer
233 views

is_category() in pre_get_posts strange error

I have a function that sets posts_per_page option depending on the category viewed. I discovered and error which I can't really understand: first this is how I get the error: function ...
0
votes
2answers
97 views

Create Cross Promoting Categories in Wordpress Using 'pre_get_posts'

What am I trying to do? Assign more than 1 category to a post so that it would appear in each category template without 1 main category in the URL. WP's default behavior when you select more than ...
1
vote
1answer
105 views

Showing posts from different categories and from custom post type

On my main page, I want to show posts from 3 categories, and 1 custom post type. Is there a way to get them together in one pre_get_posts function? Or do I need to query separately - once for the ...
0
votes
2answers
2k views

Displaying custom post type on category pages but not on blog listings

I think this is a fairly simple issue but I haven't got my head around it. Question: how do I get my custom posts to show only on the category archives, but not in the blog post listing page? ...