Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
584 views
in Plugins by

I've looked at NoaY's q2a-book-master plug in (A great plugin in itself) which will produce an e-book from the site, excluding designated 'categories' 

I would really like to create 'The Book' from a selected 'Category' and would rather have to add than exclude categories by default... Can anyone guide me on how to change/reverse the default please?

Q2A version: 1.6.3 (Candidate)

1 Answer

+1 vote
by
Examine the plugin's SQL query to see how the to-be-included items are being  filtered.
It will be something like:

SELECT stuff FROM table WHERE 'id_category' = (int)some_value

To achieve your desired (inverted selection) result, revise the query to read:

SELECT stuff FROM table WHERE 'id_category' != (int)some_single_value

^--- to select from all except one category

v--- to select from all except certain (multiple, enumerated) categories

SELECT stuff FROM table WHERE 'category' NOT IN('3', '5', '6')
by
Thanks sammi... I'll have a look through the php files and see if I can find and alter the code as above.
...