ProRank SEO

Schema & Settings

Configure global business information, schema markup settings, and social profiles with media library integration

Access Path: ProRank SEO → Local SEO → Schema & Settings tab

Overview

The Schema & Settings tab is where you configure your primary business information that applies globally across all locations. This includes organization details, default schema settings, map integration, opening hours format, and social profiles. All settings are saved via WordPress options API with proper sanitization.

Settings Registration

// Registered in UnifiedLocalSeo.php
register_setting('prorank_local_seo', 'prorank_local_seo_settings', [
    'sanitize_callback' => [$this, 'sanitize_settings']
]);

Entity Information

The Entity Information section determines how your organization is represented in schema markup:

SettingTypeDescriptionDefault
Entity TypeSelectOrganization or Personorganization
Website NameTextMain site name/title
Organization NameTextLegal business name
Organization URLURLMain website URL
Organization LogoMedia PickerBusiness logo from media library
Media Library Integration: The Organization Logo field features a fully functional WordPress media library picker with:
  • Visual preview of selected logo
  • "Select from Media Library" button opening wp.media modal
  • "Remove Logo" button to clear selection
  • Manual URL input as alternative option

Business Details

Configure your primary business contact information and address:

SettingTypeDescriptionRequired
Business EmailEmailPrimary contact emailNo
Business PhoneTelPrimary phone numberNo
Street AddressTextPhysical street addressNo
CityTextCity nameNo
State/RegionTextState or provinceNo
Postal CodeTextZIP or postal codeNo
CountrySelectCountry selection (US, CA, GB, AU, etc.)No

Default Schema Settings

Configure default settings for all locations:

SettingTypeDescriptionOptions
Default Business TypeSelectDefault schema.org type for new locationsLocalBusiness, Restaurant, Store, Hotel, MedicalBusiness, ProfessionalService
Use Multiple LocationsToggleEnable multi-location managementOn/Off
All Locations Same OrganizationToggleAll locations belong to same orgOn/Off

Map Integration

Configure map provider and display settings:

SettingTypeDescriptionDefault
Map ProviderSelectChoose map serviceGoogle Maps / OpenStreetMap / Mapbox
Google Maps API KeyTextRequired for Google Maps
Enable Location DetectionToggleAllow user location detectiontrue
Show MapToggleDisplay map on frontendtrue
Show DirectionsToggleShow directions buttontrue
Google Maps requires a valid API key from Google Cloud Console with Maps JavaScript API enabled.

Social Profiles

Add your social media profiles for enhanced schema markup:

PlatformTypeExampleSchema Property
Facebook URLURLhttps://facebook.com/yourbusinesssameAs
Twitter URLURLhttps://twitter.com/yourbusinesssameAs
Instagram URLURLhttps://instagram.com/yourbusinesssameAs
LinkedIn URLURLhttps://linkedin.com/company/yourbusinesssameAs
YouTube URLURLhttps://youtube.com/c/yourbusinesssameAs

Social profiles are included in the organization schema as "sameAs" properties, helping search engines understand your brand presence across platforms.

Media Library Picker Implementation

The media library picker is implemented using WordPress's built-in wp.media API:

// Implementation in local-seo.js (lines 8-95)
$('.select-logo-btn').on('click', function(e) {
    e.preventDefault();
    
    // Create the media uploader
    mediaUploader = wp.media({
        title: 'Select Organization Logo',
        button: { text: 'Use This Logo' },
        library: { type: 'image' },
        multiple: false
    });
    
    // When image is selected
    mediaUploader.on('select', function() {
        var attachment = mediaUploader.state()
            .get('selection').first().toJSON();
        
        // Update preview
        $('#logo-preview-image').attr('src', attachment.url).show();
        $('.no-logo-placeholder').hide();
        
        // Update hidden fields
        $('#organization_logo').val(attachment.url);
        $('#organization_logo_id').val(attachment.id);
    });
    
    mediaUploader.open();
});

The selected logo is saved with both URL and attachment ID for flexibility. The media library is properly enqueued with wp_enqueue_media() in the UnifiedLocalSeo class.

Business Details

Configure your primary business contact information and address:

Address Fields

  • Business Email: Sanitized with sanitize_email()
  • Business Phone: Sanitized with sanitize_text_field()
  • Street Address: Full street address including number
  • City, State, Postal, Country: Complete address components
  • Price Range: $ to $$$$ indicators for service pricing

Default Schema Settings

Configure default settings for new locations and schema behavior:

Default Business Type

Select from 30+ LocalBusiness schema types. This becomes the default for new locations but can be overridden per location.

Options: LocalBusiness, Restaurant, Store, MedicalBusiness, ProfessionalService, etc.

Multiple Locations

Enable if you have multiple business locations. When checked, shows the multi-location management section with import/export tools.

Saved as boolean: !empty($input['use_multiple_locations'])
The "All Locations Part of Same Organization" option helps search engines understand the relationship between your locations for better brand recognition.

Map Integration Settings

Configure how maps are displayed and integrated across your locations:

SettingPurposeDefaultType
Map ProviderSelect mapping serviceGoogle MapsSelect
Google Maps API KeyEnable interactive mapsNoneText
Map StyleVisual appearanceRoadmapSelect (Roadmap/Satellite/Hybrid/Terrain)
Max LocationsLimit on store locator10Number (absint)
Directions LabelButton textGet DirectionsText
Location DetectionAllow geolocationDisabledCheckbox
Enhanced SearchAdvanced filteringDisabledCheckbox
// Sanitization in sanitize_settings()
$sanitized['google_maps_api_key'] = sanitize_text_field($input['google_maps_api_key'] ?? '');
$sanitized['max_locations'] = absint($input['max_locations'] ?? 10);
$sanitized['enable_location_detection'] = !empty($input['enable_location_detection']);

Opening Hours Configuration

Set default display formats for opening hours across all locations:

Time Format

  • • 12-hour (AM/PM) - e.g., 9:00 AM - 5:00 PM
  • • 24-hour - e.g., 09:00 - 17:00

Special Labels

  • • Closed Label: "Closed"
  • • 24/7 Label: "Open 24/7"
  • • 24 Hours Label: "Open 24 hours"
Individual locations can override these settings with specific hours. The "Hide Opening Hours" option removes hours from both schema markup and frontend display.

KML Sitemap Settings

Enable KML (Keyhole Markup Language) sitemap generation for Google Maps integration:

Implementation Details

  • URL Rewrite: Registered at /locations.kml
    add_rewrite_rule('^locations.kml$', 'index.php?prorank_kml=1', 'top');
  • Output Format: Valid KML 2.2 with Placemark elements for each location
  • Requirements: Only includes locations with valid latitude/longitude coordinates
  • Content Type: application/vnd.google-earth.kml+xml

Schema Validation

The Schema Validation section provides real-time validation of your configuration:

Validation Process

  1. Click "Run Validation" button
  2. AJAX call to prorank_validate_schema
  3. Server checks all settings and locations
  4. Returns categorized results:
    • Errors - Critical issues that must be fixed
    • Warnings - Recommendations for improvement
    • Checks - Passed validation items
  5. Auto-validates on page load after 1 second delay
// Auto-validation on page load
setTimeout(validateSchema, 1000);

// Manual validation
$('#validate-schema-btn').on('click', validateSchema);

Social Profiles

Add your social media URLs to enhance your online presence and schema markup:

PlatformField NameExampleSanitization
Facebookfacebook_urlhttps://facebook.com/yourpageesc_url_raw()
Twitter/Xtwitter_urlhttps://twitter.com/yourhandleesc_url_raw()
Instagraminstagram_urlhttps://instagram.com/yourhandleesc_url_raw()
LinkedInlinkedin_urlhttps://linkedin.com/company/yourcompanyesc_url_raw()
YouTubeyoutube_urlhttps://youtube.com/c/yourchannelesc_url_raw()

Social profiles are added to the schema markup as sameAs properties, helping search engines verify your brand's online presence.

Form Submission

The settings form submits to WordPress's standard options.php handler:

<form id="prorank-local-seo-form" method="post" action="options.php">
    <?php settings_fields(&apos;prorank_local_seo&apos;); ?>
    <!-- Form fields -->
    <?php submit_button(&apos;Save Settings&apos;, &apos;primary large&apos;); ?>
</form>
All input is sanitized through the registered callback function sanitize_settings()which applies appropriate sanitization for each field type.

Important Pages Selection

Select important pages for enhanced schema context:

Page Dropdowns

Uses WordPress's wp_dropdown_pages() function to generate select lists of all published pages.

  • About Page: Your about us or company information page
  • Contact Page: Primary contact information page

Page IDs are saved as integers using absint()