I am trying to create a Google sitemap. On some of my channels I need to only output URLs that match a certain criteria based on custom fields. If I use the search parameter it works fine... except if I am using the diable="custom_fields" parameter. If that parameter is in then the search parameter is ignored completely. Seems like a bug to me since I can disable categories yet use the categories parameter just fine. So how can I get around this? I can't really enable custom fields since I will be running through all the pages in my site and that would slow things down quite a bit. Any ideas?

I was thinking of using a conditional inside the exp:entries tag... but with custom_fields disabled, I wouldn't have anything to test against.

1 Answer 1


This is not really a bug, but more of an inconsistency in how performance bottlenecks are determined.

The reason that you can still filter by category even when categories are disabled in your tag is likely because the exp_category_posts table has its columns indexed (so running a JOIN on them in the query is pretty fast), whereas the exp_channel_data's custom field columns are not.

I'd just keep custom_fields enabled and use caching to lighten the load (either tag caching, template caching, or for a much better option, CE Cache).

  • So load wise, leaving custom_fields on for let's say a channel with 100 entries with won't be too heavy a DB load?
    – James
    Jun 4, 2013 at 15:26
  • That all depends on your server resources - but I would guess that you'll be fine. Try it and see! Jun 4, 2013 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.