Query category by URL where category includes spaces

Home Forums Calendar Products Events Calendar PRO Query category by URL where category includes spaces

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #950729
    Will
    Participant

    I am aware that I can query all events by category via the URL form {URI}/events/category/<category name> but how can I query all events in a category where the category name includes a space? I have tried replacing the space with %2-, _ or + but they don’t work.

    Thanks

    #950795
    Geoff
    Member

    Hi there, Will! Welcome to the forums and thanks for getting in touch. 🙂

    Good question. It may depend on your WordPress settings, but most default configurations will hyphenate category slugs for multi-word categories.

    So, for example, if you have a category called Sunday Morning Service, you might expect to access that at: [your-site]/events/category/sunday-morning-service/

    You can also see your category slugs by heading over to Events > Event Categories in the WordPress admin and selecting the category.

    Does this help out? Please let me know. 🙂

    Geoff

    #950803
    Will
    Participant

    Many thanks – works a treat.

    Never thought to try a dash as the default separator (or check the slug) – I’m relatively new to WordPress.

    Thanks,

    Will

    #950805
    Geoff
    Member

    My pleasure! So glad that worked out. WordPress is great and I hope you enjoy finding your way around it. 🙂

    Feel free to hit us up with a new thread if any other questions pop up and we’d be happy to help.

    Cheers!
    Geoff

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Query category by URL where category includes spaces’ is closed to new replies.