wordpress添加媒体_如何在WordPress中正确添加您的公司地址

wordpress添加媒体

Do you want to display your business address in WordPress? Usually you can just type the address on your contact page or in a sidebar widget. But this approach is not search engine optimized. In this article, we will show you how to properly add your business address in WordPress with a map and other useful information.

您要在WordPress中显示您的公司地址吗? 通常,您只需在联系页面或侧边栏小部件中输入地址即可。 但是这种方法并未对搜索引擎进行优化。 在本文中,我们将向您展示如何在WordPress中使用地图和其他有用信息正确添加您的公司地址。

Adding a business address in WordPress
何时何地需要WordPress中的公司地址 (When and Why You Need Business Address in WordPress)

Usually most business websites add their address on their contact page. They use a contact form plugin like WPForms to add a contact form.

通常,大多数企业网站都会在其联系页面上添加其地址。 他们使用WPForms之类的联系表单插件来添加联系表单。

This works fine for most websites and online business. However when you have a physical business, its beneficial if you add your address in a search engine optimized format.

这适用于大多数网站和在线业务。 但是,如果您经营实体业务,则以搜索引擎优化格式添加地址会有所帮助。

We recommend adding a contact form as well as other informations like maps, directions, phone number, and business hours in a SEO friendly format.

我们建议以SEO友好格式添加联系表格以及其他信息,例如地图,方向,电话号码和营业时间

Let’s see how you can add your business address in WordPress in a SEO friendly way.

让我们看看如何以SEO友好的方式在WordPress中添加您的公司地址。

影片教学 (Video Tutorial)

演示地址

If you don’t like the video or need more instructions, then continue reading.

如果您不喜欢该视频或需要更多说明,请继续阅读。

在WordPress中添加公司地址 (Adding a Business Address in WordPress)

First thing you need to do is install and activate the Business Profile plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活Business Profile插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Upon activation, the plugin will add a new menu item labeled Business Profile to your WordPress admin bar. Clicking on it will take you to plugin’s settings page.

激活后,该插件将在您的WordPress管理栏中添加一个名为Business Profile的新菜单项。 单击它会将您带到插件的设置页面。

Business Profile plugin settings page

First you need to select the Schema type. Schema.org is the standard micro-data vocabulary used by search engines to show rich snippets and additional information with search results.

首先,您需要选择架构类型。 Schema.org是搜索引擎用来显示丰富的摘要和带有搜索结果的其他信息的标准微数据词汇表。

Select a schema type that best describes your business.

选择最能描述您的业务的架构类型。

Under the contact information section, you need to provide the name and address of your business. After entering the address, click on ‘Retrieve map coordinates’ link. The plugin will automatically fetch map coordinates for the address you entered.

在联系信息部分下,您需要提供您的公司名称和地址。 输入地址后,点击“检索地图坐标”链接。 插件将自动获取您输入地址的地图坐标。

Next, you need to provide a Google Maps API key. Generating this key is easy, click on the Get an API key link.

接下来,您需要提供一个Google Maps API密钥。 生成此密钥很容易,请单击“获取API密钥”链接。

API key link

This will take you to the Google Developer Console website. You need to locate ‘Get a key’ button and click on it.

这将带您到Google Developer Console网站。 您需要找到“获取密钥”按钮,然后单击它。

Get API Key button

On the next screen, simply click on the continue button to create a new project. You will have to wait for a few seconds as your new project is created.

在下一个屏幕上,只需单击继续按钮即可创建一个新项目。 创建新项目时,您将需要等待几秒钟。

Create a new Google Maps API project

Once your project is ready, you will be redirected to setup credentials. Enter a name for your project and the domains where this API key will be used. Use asteriks to white label your entire domain. For example,

项目准备就绪后,您将被重定向到设置凭据。 输入项目的名称以及将使用此API密钥的域。 使用星号为您的整个域添加白色标签。 例如,

*.example.com/*

*.example.com/*

Make sure to replace example.com with your own domain name.

确保用您自己的域名替换example.com。

API Credentials

After that click on the create button to continue. Your API Key will now be displayed in a popup.

之后,单击创建按钮继续。 您的API密钥现在将显示在弹出窗口中。

Copy your API Key

You need to copy your API key and paste it on the plugin’s settings page.

您需要复制API密钥并将其粘贴到插件的设置页面上。

Contact info section

You can now continue entering other contact information on plugin’s settings page. You can add a phone number, and select a page where users can contact you.

现在,您可以继续在插件的设置页面上输入其他联系信息。 您可以添加电话号码,然后选择用户可以与您联系的页面。

This could be a page with your contact form (See our step by step guide on how to create a contact form in WordPress).

这可能是包含您的联系表单的页面(请参阅有关如何在WordPress中创建联系表单的分步指南)。

Under the schedule section, you can enter your business hours. Simply click on add business hours button and then select days and hours you are open for business.

在计划部分下,您可以输入工作时间。 只需单击添加营业时间按钮,然后选择营业时间。

Enter your business hours

If you want to add multiple locations, then check the box next to multiple locations option. Click on the ‘Save Changes’ button to store your plugin settings.

如果要添加多个位置,请选中多个位置选项旁边的框。 单击“保存更改”按钮以存储您的插件设置。

Now that you are done creating your business profile, it is time to add it on your website.

既然您已经完成创建业务资料,现在该将其添加到您的网站上了。

在您的网站上显示公司地址 (Showing Business Address on Your Website)

Start by creating a new page in WordPress or edit an existing one. You need to add this shortcode inside post editor where you want to display your business profile.

首先在WordPress中创建新页面或编辑现有页面。 您需要在要显示业务资料的帖子编辑器中添加此短代码

[contact-card]

[contact-card]

Make sure to save your page and publish it.

确保保存您的页面并发布。

That’s all, you can now visit the page to see your full business address information. It will have your business address, a link to get directions, phone number, and a map with your business location highlighted.

就是这样,您现在可以访问该页面以查看完整的公司地址信息。 它将包含您的公司地址,用于获取路线,电话号码的链接以及突出显示您的公司位置的地图。

Business address page with contact information and map

You can also display your business address in a sidebar. To do that, go to Appearance » Widgets page, and you will see a new ‘Contact Card’ widget under the list of available widgets.

您也可以在边栏中显示您的公司地址。 为此,请转到外观»小部件页面,您将在可用小部件列表下看到一个新的“联系卡”小部件。

Simply add the contact card widget to a sidebar (See how to add and use widgets in WordPress).

只需将联系人卡片小部件添加到侧边栏(请参阅如何在WordPress中添加和使用小部件 )。

The contact card widget allows you to choose which information you want to display in your sidebar. Simply check options you want to be displayed and then click on the save button.

联系人卡片小部件允许您选择要在侧栏中显示的信息。 只需检查您想要显示的选项,然后单击“保存”按钮。

Showing your business address in a sidebar widget
为公司地址添加多个位置 (Adding Multiple Locations for Business Address)

If you enabled the multiple locations option in plugin’s settings, then you can manage multiple business locations. Go to Locations » All Locations page and then click on Add New button.

如果您在插件设置中启用了多个位置选项,则可以管理多个业务位置。 转到位置»所有位置页面,然后单击添加新按钮。

Adding new business locations

You will now see the Add new location page which looks a lot like a post or page edit screen. That’s because your location is stored as a custom post type.

现在,您将看到“添加新位置”页面,该页面看起来很像帖子或页面编辑屏幕。 那是因为您的位置存储为自定义帖子类型

Edit location

You need to add your business name in the title and use the post editor to provide any description that you may want to add.

您需要在标题中添加您的公司名称,并使用帖子编辑器提供您可能想要添加的任何描述。

Next, select the Schema type and enter your contact details just like you did on the plugin’s settings page. You will also find a meta box to add your business hours.

接下来,选择模式类型,然后输入您的联系信息,就像在插件的设置页面上所做的一样。 您还将找到一个元框来添加您的营业时间。

Once you are done, you can publish your location.

完成后,您可以发布位置。

All your locations can be seen on the custom post type’s archive page which will be found at:

您的所有位置都可以在自定义帖子类型的存档页面上看到,该页面位于:

http://www.example.com/location

http://www.example.com/location

Replace example.com with your own domain name.

用您自己的域名替换example.com。

Each location will also have its own permalink URL. You can go to Locations » All Locations and click on ‘View’ link to find a location’s page.

每个位置还将有其自己的永久链接URL。 您可以转到位置»所有位置 ,然后单击“查看”链接以找到位置页面。

Location permalink

You can also manually add a particular location to a post or page using a shortcode like this:

您还可以使用类似以下的短代码将特定位置手动添加到帖子或页面:

[contact-card location=2]

[联系卡位置= 2]

Replace 2 with the location’s post id. See our guide on how to find post id in WordPress.

将2替换为位置的职位ID。 请参阅我们的指南, 了解如何在WordPress中查找帖子ID

That’s all, we hope this guide helped you learn how to properly add your business address in WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.

仅此而已,我们希望本指南能帮助您学习如何在WordPress中正确添加您的公司地址。 您可能还希望查看我们的24个列表, 这些列表必须具有用于商业网站的WordPress插件

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-properly-add-your-business-address-in-wordpress/

wordpress添加媒体

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值