Skip to main content

Editing Site Settings

This guide explains how to edit Site Settings in Sanity Studio, including managing multiple phone numbers.

Accessing Site Settings

  1. Log in to Sanity Studio
  2. Navigate to Settings in the sidebar
  3. Click on Site Settings

The Site Settings document is a singleton, meaning there's only one instance that contains all global site configuration.

Managing Phone Numbers

Adding Phone Numbers

The Site Settings document supports multiple phone numbers that can be displayed in different locations.

  1. Navigate to Settings → Site Settings
  2. Scroll to the Contact Phone Numbers section
  3. Click Add item to add a new phone number
  4. Fill in the phone number details:
    • Phone Number (required): Enter the phone number (e.g., "+1 234 567 8900")
    • Label (optional): Add labels for different languages
      • English: Enter label like "Main", "Sales", "Support"
      • Spanish: Enter Spanish translation
      • Romanian: Enter Romanian translation
    • Display Location (required): Select where to show this phone number
      • Check Contact Page to show on the contact page
      • Check Footer to show in the site footer
      • Check both to show in both locations
  5. Click Save to save the Site Settings document

Editing Phone Numbers

  1. Find the phone number in the Contact Phone Numbers list
  2. Click on the phone number to expand it
  3. Make your changes
  4. Click Save

Removing Phone Numbers

  1. Find the phone number you want to remove
  2. Click the Remove button (trash icon) next to the phone number
  3. Click Save to confirm the removal

Reordering Phone Numbers

  1. Click and drag the phone number items to reorder them
  2. The order determines how they appear on the frontend
  3. Click Save after reordering

Tips for Managing Phone Numbers

Multiple Phone Numbers

You can add multiple phone numbers for different purposes:

  • Main Office: Primary business number (show on contact page and footer)
  • Sales: Sales department number (show on contact page)
  • Support: Customer support number (show in footer)
  • Emergency: Emergency contact (show in footer)

Display Locations

Choose display locations based on where users need to see the number:

  • Contact Page Only: Use for specific departments (Sales, HR, etc.)
  • Footer Only: Use for general support or after-hours numbers
  • Both: Use for main business numbers that should be visible everywhere

Labels

Labels help users identify different phone numbers:

  • Keep labels short and clear
  • Use consistent naming (e.g., "Main", "Sales", "Support")
  • Translate labels for all supported languages
  • Labels are optional but recommended for multiple numbers

Phone Number Format

Best practices for phone number formatting:

  • Use international format: +1 234 567 8900
  • Include country code
  • Use consistent spacing
  • Make it readable for users

Other Site Settings

  1. Click on the Logo field
  2. Upload or select an image
  3. Adjust the crop/hotspot if needed
  4. Click Save
  1. Expand the Social Links section
  2. Enter URLs for each social media platform:
    • Facebook
    • Twitter
    • LinkedIn
    • Instagram
    • GitHub
  3. Leave fields empty if you don't use that platform
  4. Click Save

Contact Email

  1. Enter the primary contact email address
  2. This email is used for contact forms and general inquiries
  3. Click Save

Address

  1. Expand the Address section
  2. Fill in the business address:
    • Street
    • City
    • State/Province
    • ZIP/Postal Code
    • Country
  3. Click Save

Business Hours

  1. Expand the Business Hours section
  2. Enter hours for each day of the week
  3. Format: "9:00 AM - 5:00 PM" or "Closed"
  4. Click Save

Publishing Changes

After making changes:

  1. Click Publish in the top right
  2. Changes will be live immediately (or after cache clears)
  3. The frontend will automatically update to show new phone numbers

Legacy Phone Number Field

The Contact Phone (Legacy) field is still available for backward compatibility:

  • Only use this if you have a single phone number
  • New implementations should use the Contact Phone Numbers array
  • The legacy field will be used as a fallback if no phone numbers are in the array

Troubleshooting

Phone Number Not Showing

  1. Check Display Location: Ensure the phone number has at least one display location selected
  2. Verify Publishing: Make sure you've published the Site Settings document
  3. Check Cache: Clear cache if changes aren't appearing
  4. Frontend Code: Ensure the frontend code is checking the contactPhones array

Multiple Numbers Not Displaying

  1. Check Array: Verify phone numbers are in the contactPhones array, not just the legacy field
  2. Display Locations: Ensure each number has appropriate display locations selected
  3. Frontend Filtering: The frontend filters by location, so verify the filtering logic

Labels Not Showing

  1. Check Language: Ensure labels are filled for the current site language
  2. Label Field: Verify labels are in the correct format (object with language keys)
  3. Frontend Code: Ensure the frontend is reading the label field correctly