modifying query in pre_get_posts hook doesn't take effect

Posted in: Newspaper
Post count: 62

Hi,

I’m creating a category template where I’m wanting to tailor the query a bit before they are displayed. I’m trying to use the pre_get_posts hook, but no matter what I do to the query here, no changes take effect.

Is the theme overriding what I’m doing in pre_get_posts after my code? How can I modify the query?

Post count: 62

I should mention that my category template is identical (copied and pasted) from the default “category.php” file that comes with the theme.

Post count: 23312

Hello GreatTaste,

Unfortunately, please keep in mind that we cannot provide custom implementation, sorry! If you are not aware of the steps which are needed to take in this case, please consider hiring a freelancer/developer to help you.

Thanks for your understanding!

Post count: 62

At least you can answer this question? :

Is the theme overriding (or modifying the query) after my own pre_get_posts() hook, regardless of the hook priority? The code for this is placed in the theme’s functions.php file.

Post count: 23312

Hello GreatTaste,

Notice that we are also making a hook regarding on this case in td_wp_booster_functions.php like this -> https://www.screencast.com/t/MvCn6wnJLJgf

Thanks for your understanding!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.