If your account has access to the Wordpress and FTP Publishing Add On, your Interface settings will include a group of settings called "Search Engine Optimization Settings" as shown here:

When the Landing Pages are generated, the settings from this group are used to generate and transfer each Landing Page to your Web server.  They can be transferred via FTP as static HTML files or to Wordpress as posts or pages.

The settings are as follows:

  • Enable SEO Landing Pages:  This is the master "on/off" switch that allows the system to generate the Landing Pages for publishing via FTP or WordPress.
  • Automatically Update Static Pages:  When set to "Yes", this option triggers the automatic update and deployment of static pages when either Interface settings are changed or an individual location is updated.
  • Location Schema:  This option selects the Rich Snippet Schema (from schema.org) that allows search engines to identify the object on the landing page.
  • URL of MetaLocator Interface: This URL is used to return the user from the Landing page to the MetaLocator Interface.
  • URL of Locations Folder:  This is the full public URL of the folder containing these Landing Pages.  This URL is used in creating the sitemap.  Not required for Wordpress-only integrations.
  • Location Landing Page Header:  This is the header of the landing page.  This is the complete top half of the landing page template.  The MetaLocator location data will be inserted after this section, and before the footer below.  The landing page header is commonly composed by selecting the top portion of your Website's HTML template.Within the <head> tag of the Landing page header, include {head} just after the opening head tag.   This ensures MetaLocator javascript is correctly included, as shown here:

Similarly, you can generate a dynamic page title by including {title} within your <title> tag as shown here:

The header is not used for Wordpress integrations.  The header and footer can also include the location attributes for dynamic replacement.  So if you want to include the City name in the resulting document, you can use {city}.  The same syntax applies for all other fields.

  • Location Landing Page Footer:  This is the footer of the landing page.  This is the complete bottom half of the landing page template.  The MetaLocator location data will be inserted above this section, and after the header.  The footer is not used for Wordpress integrations.  The header and footer can also include the location attributes for dynamic replacement.  So if you want to include the City name in the resulting document, you can use {city}.  The same syntax applies for all other fields.
  • Index Template:  This is the template that will contain the list of links to the individual landing pages.  These pages do not necessarily need style or formatting. They serve only search engines and will rarely be viewed publicly.
  • Index Item Template:  The index item template allows control over the individual links repeated in the Index Template for each record in the Interface.  This template does not necessarily need style or formatting. This page serves only search engines and will rarely be viewed publicly.
  • Static Item Address Format:  This controls the order and layout of location fields in the Index Item Template.
  • Index Page Filename:  The name of the file that contains links to each location landing page.  This page is generally not seen by the public, it's audience is only the search engine spider.
  • Landing Page Filename Template:  This field allows for a dynamically generated filename template such as {name}_{city}_{state}.html.  Fields can be inserted just as in the MetaLocator Templates.
  • Lowercase Landing Page Filename: Setting this to "Yes" will set the filename to all lower-case characters.
  • Landing Page Filename Space Replace Character: This setting controls the character MetaLocator will use to replace spaces in the static HTML file names.  Therefore, if the {name} contains "Sample Location" and this setting contains an underscore ("_"), the resulting filename fragment will be Sample_Location.
  • Use Image CDN: This setting will cause MetaLocator to insert the full absolute URL in front of any relative image URLs.  Set this to Yes if you are not hosting your own images.

FTP Settings

If FTP Settings are provided, MetaLocator will create static HTML pages according to the settings and publish them directly to the FTP location provided.  The relevant settings are

  • FTP Host: The full host name of your FTP server.  E.g. ftp.yourwebsite.com
  • FTP Username: The username to connect to your FTP Server
  • FTP Password: The password to connect to your FTP Server
  • FTP Folder: The path to change to upon connection to your FTP Server.  E.g. domains/yourwebsite.com/html/storelocator/
  • FTP Transfer Mode:  Leave this at the default setting unless you encounter issues connecting.

Important: MetaLocator will not delete files from the FTP Server under any circumstances, including the files created by MetaLocator.  If a location page needs to be deleted,this must be done manually using a standard FTP client.

Wordpress Settings

If "Enable Wordpress Integration" is set to "Yes", MetaLocator will attempt to connect to the provided Wordpress installation and create posts or pages for each location landing page.

Important: There are three plugins required in the Wordpress installation for this to function.  Ensure these plugins are installed and activated:

  • WP Rest API - This API allows MetaLocator to create posts and pages within your Wordpress Website.
  • Raw HTML - This allows MetaLocator to create a post that does not have paragraph tags and other formatting items within the code.  Once installed, check the Disable automatic paragraphs option.
  • Basic Auth - This plugin allows MetaLocator to connect to the Wordpress Installation.  Important: This plugin can not be installed via the usual Wordpress plugin installation process.  You must manually copy the basic_auth.php to the plugins directory per the instructions in the documentation.  The basic_auth.php file must be in the plugins folder, not in a subdirectory.  FastCGI Users: Some hosts use FastCGI with PHP.  This prevents the Basic Auth plugin from functioning correctly.  If you set up the Wordpress integration, and find entries in your MetaLocator Log including the phrase, "Sorry, you are not allowed to post on this site", please see this workaround.

Once the above plugins are installed, the relevant settings include:

  • Enable Wordpress Integration: Set to Yes to enable Wordpress Integration
  • WordPress Post Status: Choose the status of the resulting post.
  • WordPress Post Type: Choose the type of the resulting post.
  • WordPress Username: The username to connect to your WordPress website.
  • WordPress Password: The password to connect to your WordPress website.
  • WordPress Website URL: The link your Website, including http, or https, as in https://www.metalocator.com/

Important: MetaLocator will not delete Wordpress posts or pages under any circumstances, including the posts or pages created by MetaLocator.  If a location page needs to be deleted,this must be done manually using the WordPress admin.

Invalid POST IDs and Changing from Posts to Pages

MetaLocator tracks the Post (or page) ID number internally.   During page generation, we check if we have an existing post ID, and if so, we update that post ID.  There are many situations where the existing POST ID could have been removed within WordPress.  When MetaLocator looks again for that post ID, it will be missing and the update will fail.  Similarly, if a POST ID was associated with a Wordpress Page, and your Interface settings were changed to Post, MetaLocator will attempt to update the existing Page, instead of creating a new Post.

The same issue can occur in our Shopify Integration if a Shopify page is moved, deleted or changed resulting in a new Shopify Page ID compared to what was stored with MetaLocator. 

In all of these cases, the POST ID stored within MetaLocator is no longer valid, and should be removed.  To do this, use the Bulk Actions menu to set the WordPress . Shopify POST ID to 0 (zero).   This will cause MetaLocator to "forget" the invalid POST ID and instead create a new page (or post).

1) Select the offending pages

2) Set the WordPress post ID to Zero
 

Invalid URLs remembered in MetaLocator

Static links are saved when pages are generated.  If you ever need to remove those saved values, you can use the same process as shown above, but choose the SEO Landing Page URL from the Field list, and leave the value field empty as shown below:

Troubleshooting SEO Pages

When connectivity issues occur between MetaLocator and your website, you may encounter problems publishing SEO pages.  This is commonly due to an incorrect password, deactivated WordPress plugin or a host issue.  To view the full dialog between MetaLocator and your Web site, open a single location by going to Data > All Records, and choose any location.  Click the SEO tab and click Generate.  This will attempt to publish a single landing page to your Web site.

Once the resulting window shows "Done", click Show Log to view the results.

The log will show every step of the page generation process.  For Wordpress, see the log entries that begin with Wordpress Responded:.  A successful page generation output including publishing to WordPress looks like this:

(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface: SELECT m.* FROM adm_metalocator_com.#__menu m INNER JOIN adm_metalocator_com.#__users u on u.id = m.user_id WHERE m.id=5112 AND u.block = 0 AND m.params like '%generate_statics":"1%' AND m.`published`=1
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface has 1 INTERFACES to generate
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface Query WAS SELECT r.*,r.name as `title` ,(SELECT location_type FROM jos_location_zips gg WHERE gg.location_id = r.id LIMIT 1) as location_type ,(SELECT time_zone FROM jos_location_zips gg WHERE gg.location_id = r.id LIMIT 1) as time_zone , (SELECT marker FROM jos_location_tags_link tl LEFT JOIN jos_location_tags t ON t.id=tl.tag_id WHERE tl.location_id = r.id ORDER BY `order` DESC LIMIT 1 ) AS marker, (SELECT `order` FROM jos_location_tags_link tl LEFT JOIN jos_location_tags t ON t.id=tl.tag_id WHERE tl.location_id = r.id ORDER BY `order` DESC LIMIT 1 ) AS marker_order ,(SELECT t.`order` as priority FROM jos_location_tags_link tl LEFT JOIN jos_location_tags t ON t.id=tl.tag_id WHERE tl.location_id = r.id AND priority=1 ORDER BY `priority` DESC,`order` DESC LIMIT 1 ) AS priority,(SELECT t.name FROM jos_location_tags_link tl LEFT JOIN jos_location_tags t ON t.id=tl.tag_id WHERE tl.location_id = r.id ORDER BY `priority` DESC,`order` DESC LIMIT 1 ) AS priority_name,(SELECT count(id) FROM jos_location_offer_link ol WHERE ol.location_id=r.id LIMIT 1) as has_offers,ASTEXT(`polygonterritory2`) as `polygonterritory2` FROM jos_locations_rollup r WHERE 1 AND r.id = 1 ORDER BY r.id ASC
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface has 1 PAGES to generate for this interface (5112)
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface mkdird /var/www/html/admin.metalocator.com/tmp/156/5112
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface symlinked hosted /var/www/html/admin.metalocator.com/hosted/directorytest
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface created directory_view.
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatePagesForInterface has 1 pages to generate.
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:hostname requested: directorytest
(uid_156 oid_156)(ip_192.168.0.9)LocatorModelStatics:generatestaticpage: Found existing post, trying to update
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded HTTP STATUS 200 Error code:0
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded ID:2604
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded title:Sample Location – 41666 Fifth Avenue New York New York
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded status:draft
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded type:post
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded author:0
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded content:...omitted...
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded parent:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded link:http://wordpress.metalocator.com/?p=2604
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded date:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded modified:2016-04-01T15:33:04
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded format:standard
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded slug:samplelocation_newyork_newyork_unitedstates_5112_1
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded guid:http://wordpress.metalocator.com/?p=2604
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded excerpt:...omitted...
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded menu_order:0
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded comment_status:closed
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded ping_status:closed
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded sticky:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded date_tz:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded date_gmt:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded modified_tz:UTC
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded modified_gmt:2016-04-01T15:33:04
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded password:
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded title_raw:Sample Location - 41666 Fifth Avenue New York New York
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded content_raw:...omitted...
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded excerpt_raw:...omitted...
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded guid_raw:http://wordpress.metalocator.com/?p=2604
(uid_156 oid_156)(ip_192.168.0.9)Wordpress responded post_meta:Array()

Tutorial Video (FTP Method)

SEO Checklist

When creating location landing pages, MetaLocator handles much of the SEO aspects for you.  However, there are a few important elements that can help ensure these pages are indexed by Google and other search engines:

  • Location keywords in your title:  Within your title tag, include important keywords including the City and State.  For example: <title>Tony's Pizza Delivery in {city}, {state}</title>.  This title includes the City and State automatically when the page is generated.
  • Location keywords in your <h1> tag:  By default your page will include the location name as an h2 tag, such as <h2>Tony's Pizza</h2>.  However you also should include important keywords including the City and State in the h1 tag similar to the title.  For example: <h1>Pizza Delivery in {city}, {state}</h1>.  This title includes the City and State automatically when the page is generated.
  • Add the SiteMap to Google Webmaster Tools: Each set of pages includes an XML sitemap.  Add this to your sitemaps within Google Webmaster Tools.
Did this answer your question?