This is a fairly broad question: a client wants to have a publicly searchable member directory. So I'm looking at some old questions, such as Creating a public Members directory with CiviCRM in Wordpress using Profiles and Creating a public Members directory with CiviCRM in Wordpress using Profiles and shortcode with no luck.

Is there a shortcode for a publicly (not as member and not logged in) searchable member directory? (I have told the client this has privacy implications.)

This is currently being used but returns no results:

[civicrm component="profile" gid="11" mode="search" hijack="0"]

enter image description here

But not showing search results may be a result of no permissions for the anonymous user, as I read in one of the linked questions. I've given anonymous users the capabilities for profile listings and forms and profile listings in Administer > WordPress Access Control. I've set up a Smart Group and a profile, outlined on https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/ . But that doesn't help.

Using: WP 5.2.4 CiviCRM 5.17.5

  • Does it return results for a logged in user?
    – Graham
    Commented Nov 12, 2019 at 14:33
  • No results for logged in users. Commented Nov 12, 2019 at 15:12

1 Answer 1


This problem turned out to be a Javascript error in the console:

SyntaxError: expected expression, got '<' on civicrm:1

A plugin must have been dumping in Javascript in the header or footer, and once it was deactivated, CiviCRM could render the search results in Javascript.

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.