natewr / business-profile Goto Github PK
View Code? Open in Web Editor NEWWordPress plugin to display your business's contact details with seo-friendly Schema.org markup.
WordPress plugin to display your business's contact details with seo-friendly Schema.org markup.
We don't actually tell the user how to use it anywhere other than the widget.
See this.
I have a custom plugin that adds an alternative phone to the default settings screen on Business Profile and at a quick glance I didn't see any way to easily add the same data to individual locations.
I think all that would be needed is an extra do_action within the meta box itself and the callback used for saving the extra meta as well.
It's also possible that I've just missed it entirely or that you prefer people register their own custom meta boxes rather than expand on the existing ones.
Hello,
our store is enlisted in google maps, but providing an address in site does not match the map. Can I manually set the coordinates? or how can I match the google list?
The plugin header file still points to the old textdomain, bpfwpdomain
, but should indicate business-profile
.
Hi,
I was looking to have the plugin translated to Portuguese and Im seeing that it already has translation files for that, although those files aren't included when installing the plugin from wordpress.org.
Anything can be done about this?
Cheers.
I was wondering if you've run into any issues using a constant for the textdomain rather than hard-coding it? It's my understanding that this can cause problems with programs like GNU Gettext.
Arguments:
disable_styles
- Whether or not to load frontend stylesheets. Default: false
disable_scripts
- Whether or not to load frontend scripts. Default: false
disable_append_to_content
- Whether or not to automatically append a contact card to the_content
in location single.php
. Default: false
Throwing a warning (not error) in console because the sensor attribute is no longer required:
https://developers.google.com/maps/documentation/javascript/error-messages
https://github.com/NateWr/business-profile/blob/master/assets/js/map.js#L13
Being output in WP 4.5.2 & BP 1.1
Notice: Trying to get property of non-object in /srv/www/allwater/htdocs/wp-content/plugins/business-profile/business-profile.php on line 207
Do you have any plans to add support for multiple locations? Would you be interested in a pull request to add them?
The add/edit interface for location
posts should support post meta in the format described in the locations standard.
Previous discussion in #6.
When a contact card appears on a page that is the same as the Contact Page setting, and no contact email has been set, it should load the contact as a hidden meta key instead of link. The link will just reload the page.
Currently the print functions are pretty naive and don't actually check if data exists before printing it out. It would be nice if they handled that themselves.
All the text can be translated, but a lot of English speakers are just not familiar with how to use translations. Some of the key phrases, like "Get Directions" and "Opening Hours" should be filtered for easy modification.
Check if Schema.org has any particular requirements for marking up multiple locations of the same business.
I'm considering making the jump to the JSON-LD format. It's what Google recommends, it will reduce the burden of tying the output to the schema, and prevent the situation where we're loading lots of rich markup objects on a single page just because we want to display the details in multiple places. It will also make it easier to inject data (like menus) into the overall entry.
The goal is to:
@robneu do you have any thoughts on this?
Recommended by lmartins. Not sure if it's going to be very effective or if there are side effects for some email clients reading the address. But worth investigating.
Yoast SEO adds JSON-LD script tags with basic website/business info. Perhaps this plugin needs to account for that if the plugin is active and pull business details from Yoast?
https://www.youtube.com/watch?v=zkccU4sqeB8&list=PL4CtPfBUilirZovJVGPHoMH-JOMWSpWoa&index=2
Multiple locations will be defined in a location
custom post type that follows the (work-in-progress) standard as closely as possible. The custom post types should be "activated" through a toggle in the main profile settings page. When activated, menu items for Locations and Add Locations will appear under the Business Profile link.
Previous discussion can be found in #6.
Hey there, This is awesome thanks. I am trying to extend it a bit to add a formatted phone number option so I can output it as a tel: href to activate calling. I have it (mostly) working, added a setting, and added getter to the template-functions, but when I output the data I am getting an error call_user_func() expects parameter 1 to be a valid callback
and am not sure I follow how the callback part is supposed to work... Any input?
Thanks!
The [contact-card]
shortcode needs to be able to handle multiple locations. It should also use a template loading technique as discussed in #6.
location
arg (use post ID) f2558b9Google now seems to expect an image
object for FoodEstablishment
types. Maybe for all LocalBusiness
types.
https://search.google.com/structured-data/testing-tool/u/0/#url=demo.themeofthecrop.com%2Fluigi
Research what's behind this new requirement and add an ability to support this.
We may be able to pull an image automatically from the new site_logo
theme option, or Yoast SEO settings.
Allow the opening_hours_brief
argument to accept a string for display instead of trying to generate it's own, so that users can opt for a more human-readable format, like "12-6pm Mon-Fri".
An address like this:
123 Street
Some Town, USA
Can become this:
?address=123+StreetSome+Town,+USA
Need to replace new lines with a space or comma when the URL is generated.
Google drops the ball for quite a few addresses, not locating them correctly. Perhaps next to the coordinate "View" button there should be an "Edit" button to enter them manually.
The custom post type for locations can be activated/deactivated from the Business Profile page, so when it's saved we should flush the rewrite rules.
Had a client that not want the default view of the Google map, as the address was already displayed above the map - they instead wanted the PIN that would open to the address when clicked.
and then when the PIN is clicked shows the address
I got the functionality needed with MapPress - https://wordpress.org/plugins/mappress-google-maps-for-wordpress/
Was wondering if the map component can be manipulated in Business Profile as it currently stands.
It looks like the display address is not being recognized by Google's Rich Snippets tool. The address gets recognized when show_address
is set to false. In this case, the plugin prints the address into the content attribute on a meta
tag.
I think this is because only the content
attribute supports a single-string address. A full schema object wants a fully-specified PostalAddress.
The template tag should be refactored to always print the address into the content attribute of a meta tag. Then we can remove the schema markup from the display markup if it's printed.
The addition of the booking link should be handled by the Restaurant Reservations plugin rather than Business Profile.
NateWr/restaurant-reservations#58
The way it's handled now in BP makes it hard to have a generic function available to call, because it's nested in a class. Implement in the reservations plugin then deprecate this technique.
bp_maps should be global (perhaps under a more protected name) and maybe it would be nice to be able pass a JSON hash with options via wp_localize_script
that would be used in the options hash.
An extra widget could display whether a business is open right now or what the current day's opening hours are.
Original request:
https://wordpress.org/support/topic/request-google-style-next-open-time?replies=1#post-8759542
On my customers websites I usually give them a slightly lower that full administrator role permissions. This is so that I can protect some sensible areas where they could introduce problems.
Problem is I need to allow them to manage business-profile details but that seems to be accessible only by administrators.
Is there any way I can customize this?
This is a pretty minor detail, but the plugin triggers a number of warnings and errors when running the WordPress PHP_CodeSniffer sniffs. If this is something you'd like to leave as-is, no big deal.
If you'd like to make the plugin more compliant, we could work on getting things updated as part of the process of building out the multiple locations feature. I'd be happy to either work the fixes in through my feature PRs or do them all in one shot with a WPCS pull request.
I have not set the map co-ords, but still getting a map shown when using the shortcode on a page.
Example - http://dev.fitmum.autopilotyourbusiness.com/contact/ It seems to be match based on the company name - but these are matching companies from different countries.
Hi again :)
So noticed an issue when clicking on 'get directions' from inside of the map content box, it fails to get directions because the URL parameter, in my case, has a <br>
in it. Works find where the address link is printed via PHP, but the
encodeURIComponent( data.address )
Is not removing the break tag. I am trying to figure out how to strip and clean it for the address, but thought I would post it for you to see also.
Right now the plugin injects the Google Maps API script after the page is loaded. This improves page load speed a little bit, but the cost is that it's very difficult to manage conflicts.
If another plugin enqueues the Google Maps api as well, this can cause conflicts, for example with Modern Tribe's Events Calendar plugin. So they need to be able to dequeue the API script without disabling the map view in our plugin.
This presents a bit of an issue around how the maps are loaded. We are passing an initialize
callback to the API as a query var, so that our maps spin up as soon as the API is loaded. If we continue to use this technique, dequeuing the API call will also disable our maps.
On the other hand, if we don't use the callback technique, we'll need to implement some kind of listener that checks when the API is loaded. I'm not super happy about that. It just seems like a lot of hassle. It might be worth diving into the Google Maps API to see if they emit any kind of loaded
event we can listen to.
Currently the Google Map "Get directions" link opens in a new window/tab within the browser.
However this is not the case for the "Get Directions" links in:
Solution:
An option to have the links open in a new window/tab would be nice.
Right now it goes direct to bpwfwp_print_contact_card()
so if someone has replaced the shortcode it doesn't show the replaced output.
Users may wish to use a location's post_content
when displaying it via shortcode or widget.
Someone recently asked me if it's possible to add a more specific business type such as InsuranceAgency. A method for doing it via a filter didn't jump out at me and I was wondering if you'd be willing to add these sub-types in to the default options array.
If so, I'll gather up a list of all of them and set up a PR. I can also add some filters to make it easier for developers to add new sub-types if they're added to the spec before we have a chance to include them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.