How do I define the block visibility for content types and term pages? I have a block and I want to show it for specific content types and taxonomy terms. There is no common pattern for those pages. 

For example, the URLs could be the following ones:


http://example.com/rolling-stones (a taxonomy term page)
http://example.com/drupal/rolling-stones (a Basic node)
http://example.com/rolling-stones-part-1 (an Article node)
http://example.com/demo-content (a Demo node)


I don't want to show the block on the Demo content type, but on nodes of the content types, and term pages, without cloning/replicating the block.

How can I achieve this?
If you control the code for the block, then it really is a simple matter of:


Defining the correct cache contexts (path probably)
In the build method, determining the context (getting current node, tax info from the node, and the like.)
Deciding what to output for the context
If you don't want to display it, return and empty build array (or NULL).


If you don't control the block content (e.g. view or 3rd party module), you can do the same as above and use the various methods to render the block from code.