Editing Site Settings
This guide explains how to edit Site Settings in Sanity Studio, including managing multiple phone numbers.
Accessing Site Settings
- Log in to Sanity Studio
- Navigate to Settings in the sidebar
- 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.
- Navigate to Settings → Site Settings
- Scroll to the Contact Phone Numbers section
- Click Add item to add a new phone number
- 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
- Click Save to save the Site Settings document
Editing Phone Numbers
- Find the phone number in the Contact Phone Numbers list
- Click on the phone number to expand it
- Make your changes
- Click Save
Removing Phone Numbers
- Find the phone number you want to remove
- Click the Remove button (trash icon) next to the phone number
- Click Save to confirm the removal
Reordering Phone Numbers
- Click and drag the phone number items to reorder them
- The order determines how they appear on the frontend
- 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
Logo
- Click on the Logo field
- Upload or select an image
- Adjust the crop/hotspot if needed
- Click Save
Social Links
- Expand the Social Links section
- Enter URLs for each social media platform:
- GitHub
- Leave fields empty if you don't use that platform
- Click Save
Contact Email
- Enter the primary contact email address
- This email is used for contact forms and general inquiries
- Click Save
Address
- Expand the Address section
- Fill in the business address:
- Street
- City
- State/Province
- ZIP/Postal Code
- Country
- Click Save
Business Hours
- Expand the Business Hours section
- Enter hours for each day of the week
- Format: "9:00 AM - 5:00 PM" or "Closed"
- Click Save
Publishing Changes
After making changes:
- Click Publish in the top right
- Changes will be live immediately (or after cache clears)
- 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
- Check Display Location: Ensure the phone number has at least one display location selected
- Verify Publishing: Make sure you've published the Site Settings document
- Check Cache: Clear cache if changes aren't appearing
- Frontend Code: Ensure the frontend code is checking the
contactPhonesarray
Multiple Numbers Not Displaying
- Check Array: Verify phone numbers are in the
contactPhonesarray, not just the legacy field - Display Locations: Ensure each number has appropriate display locations selected
- Frontend Filtering: The frontend filters by location, so verify the filtering logic
Labels Not Showing
- Check Language: Ensure labels are filled for the current site language
- Label Field: Verify labels are in the correct format (object with language keys)
- Frontend Code: Ensure the frontend is reading the label field correctly
Related Documentation
- Site Settings Schema - Complete schema reference
- Contact Information - Feature overview
- Content Management - General content editing guide
- Sanity CMS Overview - Sanity Studio basics