{"id":7879,"date":"2025-06-10T11:57:31","date_gmt":"2025-06-10T11:57:31","guid":{"rendered":"https:\/\/gocuris.com\/?page_id=7879"},"modified":"2026-01-16T16:01:36","modified_gmt":"2026-01-16T22:01:36","slug":"virtual-services","status":"publish","type":"page","link":"https:\/\/gocuris.com\/virtual-services\/","title":{"rendered":"Virtual Services"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"7879\" class=\"elementor elementor-7879\" data-elementor-post-type=\"page\">\n\t\t\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-570464e9 e-flex e-con-boxed e-con e-parent\" data-id=\"570464e9\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-49118e50 e-con-full e-flex e-con e-child\" data-id=\"49118e50\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-68f7e11d elementor-widget elementor-widget-image\" data-id=\"68f7e11d\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"582\" src=\"https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-1024x745.jpg\" class=\"attachment-large size-large wp-image-7876\" alt=\"\" srcset=\"https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-1024x745.jpg 1024w, https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-300x218.jpg 300w, https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-768x559.jpg 768w, https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-1536x1118.jpg 1536w, https:\/\/gocuris.com\/wp-content\/uploads\/2025\/05\/look-studio-6SMWPqaCNk8-unsplash-scaled-e1749557268216-2048x1491.jpg 2048w\" sizes=\"(max-width: 800px) 100vw, 800px\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-321d6c e-con-full e-flex e-con e-child\" data-id=\"321d6c\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-fdc5d8f elementor-widget elementor-widget-theme-post-title elementor-page-title elementor-widget-heading\" data-id=\"fdc5d8f\" data-element_type=\"widget\" data-widget_type=\"theme-post-title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Virtual Services<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b7418de elementor-widget elementor-widget-text-editor\" data-id=\"b7418de\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Expert mental health care &amp; nutrition services, online or in person \u2014 personalized and integrated into your total wellness plan.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-5c505be0 e-flex e-con-boxed e-con e-parent\" data-id=\"5c505be0\" data-element_type=\"container\" id=\"virtualProviders\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-2cb4a4e e-con-full e-flex e-con e-child\" data-id=\"2cb4a4e\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-705e24cd e-con-full e-flex e-con e-child\" data-id=\"705e24cd\" data-element_type=\"container\">\n\t\t<div data-particle_enable=\"false\" data-particle-mobile-disabled=\"false\" class=\"elementor-element elementor-element-bb260c0 e-con-full e-flex e-con e-child\" data-id=\"bb260c0\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5d64eeab elementor-widget__width-initial elementor-widget elementor-widget-heading\" data-id=\"5d64eeab\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Find a Virtual Provider<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e23960e elementor-widget elementor-widget-html\" data-id=\"e23960e\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!-- \u2705 FILTER BAR -->\n<div id=\"provider-filters\" style=\"display: flex; flex-wrap: wrap; gap: 1rem;\">\n  <select id=\"filter-state\"><option value=\"\" disabled selected>State<\/option><\/select>\n  <select id=\"filter-service\"><option value=\"\" disabled selected>Service<\/option><\/select>\n  <select id=\"filter-specialties\"><option value=\"\" disabled selected>Specialty<\/option><\/select>\n    <button id=\"filter-reset\" style=\"padding:0.5rem 1rem;\">Reset<\/button>\n  <button class=\"search-btn\" id=\"filter-submit\" style=\"padding: 0.5rem 2rem;\">Search<\/button>\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-159e14f elementor-widget elementor-widget-html\" data-id=\"159e14f\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div id=\"provider-results\" style=\"display: grid;\"><\/div>\n\n<script>\nlet currentPage = 1;\nconst perPage = 10;\n\nfunction decodeHTMLEntities(str) {\n  const txt = document.createElement('textarea');\n  txt.innerHTML = str;\n  return txt.value;\n}\n\nfunction initProviderFilters() {\n  const allowedMainServices = ['chiropractic', 'mental-health', 'nutrition', 'weight-loss'];\n\n  const taxonomies = {\n    states: new Set(),\n    services: new Set(),      \/\/ stores JSON strings of {title, slug}\n    specialties: new Set()    \/\/ stores JSON strings of {title, slug}\n  };\n  const serviceToSpecialties = {}; \/\/ { serviceSlug: Set(JSON-stringified spec) }\n\n    (window.providerData || []).forEach(p => {\n      \/\/ \u2705 only include providers that are Virtual\n      const isVirtual = (p.virtual || []).some(v =>\n        v === 'Virtual \/ In-Person' || v === 'Virtual Only'\n      );\n      if (!isVirtual) return;\n    \n      \/\/ collect states from provider_state\n      if (p.provider_state) {\n        taxonomies.states.add(p.provider_state.trim());\n      }\n    \n      \/\/ collect services & specialties only if present\n      (p.services || []).forEach(s => {\n        if (!s || !s.slug) return;\n        taxonomies.services.add(JSON.stringify(s));\n    \n        if (!serviceToSpecialties[s.slug]) {\n          serviceToSpecialties[s.slug] = new Set();\n        }\n    \n        (p.specialties || []).forEach(spec => {\n          if (spec && spec.slug) {\n            taxonomies.specialties.add(JSON.stringify(spec));\n            serviceToSpecialties[s.slug].add(JSON.stringify(spec));\n          }\n        });\n      });\n    });\n\n  \/\/ Build sorted arrays\n  const statesArr = [...taxonomies.states].sort((a, b) => a.localeCompare(b));\n  const servicesArr = [...taxonomies.services]\n    .map(JSON.parse)\n    .filter(s => allowedMainServices.includes(s.slug))\n    .sort((a, b) => a.title.localeCompare(b.title));\n  const specialtiesArr = [...taxonomies.specialties]\n    .map(JSON.parse)\n    .sort((a, b) => a.title.localeCompare(b.title));\n\n  \/\/ generic populate\n  const populate = (arr, selectId, defaultLabel) => {\n    const select = document.getElementById(selectId);\n    if (!select) return;\n    select.innerHTML = '';\n    const defaultOpt = document.createElement('option');\n    defaultOpt.value = '';\n    defaultOpt.textContent = defaultLabel;\n    defaultOpt.disabled = true;\n    defaultOpt.selected = true;\n    select.appendChild(defaultOpt);\n\n    arr.forEach(item => {\n      let opt;\n      if (selectId === 'filter-state') {\n        opt = document.createElement('option');\n        opt.value = item;\n        opt.textContent = item;\n      } else {\n        opt = document.createElement('option');\n        opt.value = item.slug;\n        opt.textContent = decodeHTMLEntities(item.title);\n      }\n      select.appendChild(opt);\n    });\n  };\n\n  \/\/ initial population\n  populate(statesArr, 'filter-state', 'State');\n  populate(servicesArr, 'filter-service', 'Service');\n  populate(specialtiesArr, 'filter-specialties', 'Specialty');\n\n  \/\/ When service changes, repopulate specialties to only those for that service\n  document.getElementById('filter-service')?.addEventListener('change', function () {\n    const selectedService = this.value;\n    let specsForService = [];\n\n    if (selectedService && serviceToSpecialties[selectedService]) {\n      specsForService = [...serviceToSpecialties[selectedService]]\n        .map(JSON.parse)\n        .sort((a, b) => a.title.localeCompare(b.title));\n    } else {\n      specsForService = specialtiesArr; \/\/ all specialties\n    }\n\n    populate(specsForService, 'filter-specialties', 'Specialty');\n    currentPage = 1;\n    renderFilteredResults();\n  });\n\n  \/\/ Auto-update on change\n  ['filter-state', 'filter-specialties'].forEach(id => {\n    document.getElementById(id)?.addEventListener('change', () => {\n      currentPage = 1;\n      renderFilteredResults();\n    });\n  });\n\n  \/\/ Submit button (still optional; changes auto-apply)\n  document.getElementById('filter-submit')?.addEventListener('click', () => {\n    currentPage = 1;\n    renderFilteredResults();\n  });\n}\n\nfunction renderFilteredResults() {\n  const selected = {\n    state: document.getElementById('filter-state')?.value || '',\n    service: document.getElementById('filter-service')?.value || '',\n    specialties: document.getElementById('filter-specialties')?.value || '',\n    sortAZ: true\n  };\n\n  let filtered = (window.providerData || []).filter(p => {\n    const match = (field, val) => !val || (p[field] || []).some(t => t.slug === val);\n\n    \/\/ \u2705 Enforce Virtual Only\n    const isVirtual = (p.virtual || []).some(v =>\n      v === 'Virtual \/ In-Person' || v === 'Virtual Only'\n    );\n\n    \/\/ \u2705 provider_state match\n    const stateMatch = !selected.state || p.provider_state === selected.state;\n\n    return stateMatch &&\n           match('services', selected.service) &&\n           match('specialties', selected.specialties) &&\n           isVirtual;\n  });\n\n  if (selected.sortAZ) {\n    filtered.sort((a, b) => a.name.localeCompare(b.name));\n  }\n\n  renderProviderPagination(filtered);\n\n  \/\/ Guard these in case the util isn't on this page\n  if (typeof enableDragScroll === 'function') {\n    enableDragScroll('.specialties');\n    enableDragScroll('.focus');\n  }\n}\n\nfunction renderProviderPagination(filtered) {\n  const container = document.getElementById('provider-results');\n  const total = filtered.length;\n  const totalPages = Math.ceil(total \/ perPage);\n  const start = (currentPage - 1) * perPage;\n  const pageItems = filtered.slice(start, start + perPage);\n\n  container.classList.remove('fade-in');\n  container.classList.add('fade-out');\n\n  setTimeout(() => {\n    if (pageItems.length > 0) {\n      document.querySelector('.no-results')?.remove();\n      container.innerHTML = pageItems.map(renderProviderCard).join('');\n    } else {\n      container.innerHTML = '<div class=\"no-results\">Sorry, no available providers. Please adjust your filters.<\/div>';\n    }\n\n    requestAnimationFrame(() => {\n      const cards = container.querySelectorAll('.provider-card');\n      cards.forEach((card, i) => {\n        setTimeout(() => card.classList.add('show'), i * 50);\n      });\n      container.classList.remove('fade-out');\n      container.classList.add('fade-in');\n    });\n\n    renderPaginationControls(totalPages);\n  }, 150);\n}\n\nfunction renderPaginationControls(totalPages) {\n  let controls = '';\n  if (totalPages > 1) {\n    for (let i = 1; i <= totalPages; i++) {\n      controls += `<button class=\"pagination-btn\" data-page=\"${i}\" ${i === currentPage ? 'disabled' : ''}>${i}<\/button>`;\n    }\n  }\n\n  const existing = document.getElementById('pagination-controls');\n  if (existing) existing.remove();\n\n  const wrapper = document.createElement('div');\n  wrapper.id = 'pagination-controls';\n  wrapper.style = 'display: flex; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap;';\n  wrapper.innerHTML = controls;\n\n  document.getElementById('provider-results').after(wrapper);\n\n  wrapper.querySelectorAll('.pagination-btn').forEach(btn => {\n    btn.addEventListener('click', () => {\n      currentPage = parseInt(btn.dataset.page, 10);\n      renderFilteredResults();\n    });\n  });\n}\n\nfunction renderProviderCard(p) {\n  const pill = t => `<span class=\"pill\">${t.title}<\/span>`;\n  const pillRow = arr => (arr || []).map(pill).join('');\n\n  const locationPart = p.location_name || '';\n  const statePart = p.provider_state || ''; \/\/ \ud83d\udd01 use full provider_state for display\n\n  const locationLine =\n    locationPart && statePart ? `${locationPart}, ${statePart}` : (locationPart || statePart);\n\n  return `\n    <a class=\"providerLinkWrapper\" href=\"${p.permalink}\">\n      <div class=\"provider-card\">\n        <div class=\"card-top\">\n          <img decoding=\"async\" class=\"provider-img\" src=\"${p.image}\" alt=\"${p.name}\" \/>\n          <div>\n            <h3>${p.name}<\/h3>\n            <p class=\"professional-title\">${p.professional_title || ''}<\/p>\n            <div class=\"location-virtual-wrapper\" style=\"display:flex; flex-wrap:wrap; gap:8px; align-items:center;\">\n              ${locationLine ? `<div class=\"location\" style=\"display:inline; margin-right:10px;\">${locationLine}<\/div>` : ''}\n              <div style=\"display:inline; font-size:12px; background-color:#efefef; text-transform:capitalize; padding:2px 15px; border-radius:30px;\">Virtual<\/div>\n            <\/div>\n          <\/div>\n        <\/div>\n        <div class=\"right-wrapper\">\n          <div class=\"scroll-pills\">\n            <div class=\"specialties\">${pillRow(p.specialties)}<\/div>\n            <div class=\"focus\">${pillRow(p.focus)}<\/div>\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/a>\n  `;\n}\n\nfunction initFiltersApp() {\n  if (window.providerData) {\n    initProviderFilters();\n    renderFilteredResults();\n  }\n}\n\ndocument.addEventListener('DOMContentLoaded', initFiltersApp);\n\ndocument.getElementById('filter-reset')?.addEventListener('click', () => {\n  ['filter-state','filter-service','filter-specialties'].forEach(id => {\n    document.getElementById(id).selectedIndex = 0; \/\/ back to \"State\"\/\"Service\"\/\"Specialty\"\n  });\n  currentPage = 1;\n  renderFilteredResults();\n});\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Expert mental health care &amp; nutrition services, online or in person \u2014 personalized and integrated into your total wellness plan. Find a Virtual Provider State Service Specialty Reset Search<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_searchwp_excluded":"","footnotes":""},"class_list":["post-7879","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/pages\/7879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/comments?post=7879"}],"version-history":[{"count":98,"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/pages\/7879\/revisions"}],"predecessor-version":[{"id":10532,"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/pages\/7879\/revisions\/10532"}],"wp:attachment":[{"href":"https:\/\/gocuris.com\/wp-json\/wp\/v2\/media?parent=7879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}