More threads by danieljc

Joined
Nov 23, 2015
Messages
26
Reaction score
1
Looking for recommendation on best way to implement this:

Site has primary location (head office) city where most of the rankings occur. Want to place NAP and lat long schema in footer for primary location but override it in footer for secondary location pages with pertinent schema for those locations.

What have you guys done that's a good way to implement this?

Thanks in advance.
 
If you've got more than two locations (and it's debatably a good idea I think even if you only have two) then you've got the right idea. Main location schema/NAP everywhere except for pages specifically relevant to other locations.

I'm a little confused about your question though... like... what about this is a challenge? If you have a few hundred locations of course, it might be worth the time to have a little database put together, and generate appropriate schema and such dynamically, but if you don't have a developer who can handle that, a forum post is a pretty small amount of space to line that out.

I use JSON-LD... that means there's only one block of code you need to generate and drop in, instead of messing with a ton of in-line spaghetti on every page that's different. The fact that you're asking this question at all means you're probably not using a static website. If you're using wordpress, there's a ton of ways to do it. If you only have a couple locations, you could even make new footer.php files and write a little php to call the right one depending on the page, or you could make custom meta-data on the pages that need it that you use to fill in your footer file, or you could have a custom footer widget area, and just fill out your footer with widgets. There might be custom plugins that handle that too, though I cringe a little every time I go out looking for a new plugin to do some specific thing or other. I think Yoast might let you swap out Schema easily, but you've still got to deal with NAP changing in the footer somehow.

Whatever solution you pick, maintenance is going to be a consideration. Are you going to end up having to edit those footers a lot? Add more locations soon? etc. If you're going to need that to be easy to keep up-to-date, you might want to get a proper developer in for an hour or two to put that in place for you. It's easy enough it shouldn't take them longer than that.
 
Thanks.

The challenge is that primary location schema everywhere in the footer is simple and obvious. What's not obvious is replacing code in footer for specific pages. We're discussing best ways to do it including some of your suggestions, but I just thought I'd throw it out there to see which direction others have gone.
 
Right on. Well, there's more than one way to skin a cat, and Google might judge you in part for crappy html (though I've heard that being out of compliance doesn't directly hurt your rankings, as long as things are crawlable and fast) but Google can't spider your php at all. Whatever solution you construct (or cobble together) at least you won't be judged on it by anyone other than the people who have to make edits to those footers somewhere down the line.
 
I have this challenge on a couple of sites. One of the most challenging aspects is that I add "sub-pages" to the city landing pages on a recurring basis. I need for them to have the appropriate schema code for their city's location.

So, in effect, I need most pages and posts to have the "main" markup info, but the city pages and their sub-pages need to have the city-specific markup info.

I have tried different wordpress plugins for this. Currently I'm using this one: https://wordpress.org/plugins/display-widgets/

However, every time I add a city sub-page, I have to manually add a checkmark for that new subpage. That's because that plugin doesn't have the ability to indicate that "all sub pages" or "all child pages" should be included or excluded.

I'm testing this plugin to replace that previous one, because it does have that "all sub pages" capability: https://wordpress.org/plugins/dynamic-widgets/

Does anyone else have a better plugin for this? I don't want to start adding php code (and I'm not the best programmer on the block, anyway! :) )
 
@tcolling have you tried the widget visibility sub-plugin that comes with jetpack? https://jetpack.com/support/widget-visibility/ I've been using it on all my sites and have been happy with it, as I am able to have the widget show or hide on a taxonomy level in addition to individual pages or posts / categories. This is nice if you use any custom post types. It also will automatically hide or show on sub-pages of a taxonomy or category. I'm not sure if that helps in your situation, but it's another option that's supported by Automattic :)

@danieljc if you are on Wordpress, a plugin like tcolling mentioned or Jetpack's "widget visibility" would fit the bill in this situation really well.
 
Thank you for your suggestion, @spadilla! I appreciate your help.
 

Login / Register

Already a member?   LOG IN
Not a member yet?   REGISTER

Events

LocalU Webinar

  Promoted Posts

New advertising option: A review of your product or service posted by a Sterling Sky employee. This will also be shared on the Sterling Sky & LSF Twitter accounts, our Facebook group, LinkedIn, and both newsletters. More...
Top Bottom