Your website is often the first interaction leads have with your brand. It’s also where prospects make a purchase, learn about your products, and read about your company’s mission.

这就是为什么自定义网站准确代表您的业务,欢迎您的访问者,并让他们想花时间在您的网站上的原因是您的成长不可或缺的原因。

Grow Your Business With HubSpot's Tools for WordPress Websites

Part of customizing the design of your WordPress website entails choosing a theme. And since you already know that you can make customized tweaks and style changes to your theme of choice on templates, posts, and web pages, this naturally leads to a question:

Can I use multiple themes in WordPress?

Maybe you want your homepage to have a different theme than the rest of your website so it stands out among other web pages and provides a memorable welcome for visitors, or maybe you’re looking to customize product or service pages to better highlight your brand.

Turns out there’s an app — a plugin, actually — for that.

多个主题: WordPress

In this piece, we’ll review the steps necessary to use multiple themes on different pages of your WordPress website.

1. Back up your website.

要准备多个主题的网站,您首先要执行您的WordPress网站的完整备份在进行任何更改之前。

This will save every aspect of your site the way it is at the time of the backup — including all posts, links, comments, designs, and more — in case anything is erased or your website is corrupted.

你的网站有很多原因be erased or corrupted, including activating multiple themes on your site. That’s why properly backing up your site is so valuable — you’ll have the opportunity to effectively restore your site in the event that any content is lost.

2.关闭缓存插件。

While enabling your new theme, you might not be able to see the changes you’re making to your website due to the fact that caching plugins cause older versions of your pages to be displayed. So make sure to turn off all yourWordPress缓存插件

This allows you to view the changes you’re making to your website in real-time. By turning off your caching plugins, you’ll prevent yourself from seeing older versions of your site while enabling your new themes.

3.启用多个主题的插件。

Install the plugin for multiple themes on your website — the plugin you’ll need is called多个主题

how to Enable a wordpress plugin for multiple themes on your wordpress website

Source

4.确定您将在网站上使用多个主题的位置。

Once you have installed the plugin, go toAppearanceto view your new plugin. Now you can determine where you’ll use the multiple themes on your website.how to Decide where you’ll use multiple themes on your wordpress website in wordpress

Source

你可以到你的主页或添加一个新的主题to a specific web page on your site — let's cover how to do this next.

更改主页上的主题

要在主页上使用多个主题插件,请转到“设置”>“站点主页”。在这里,您可以在下拉菜单中为网站的主页选择选择的不同主题。选择主题后,单击“保存所有更改”。

如何在WordPress中更改主页上的WordPress主题

Source

有几种方法可以在网页上更改主题 - 在这些选项之间选择时,没有对与错。这更多是关于偏好以及您的多个主题要实现的目标。

更改网页上的主题:方法一个

第一个选项是根据该页面的永久链接或URL选择并将不同的主题分配给特定的网页或帖子。

例如,如果您希望所有共享URL结构具有相同主题的博客文章,那么您将使用此方法并选择URL前缀。

To do this, scroll down to the option for URL Prefix and select it, Then click on the theme you want to use in the dropdown menu.

Finally, enter the URL prefix that corresponds to all of your blog posts, e.g., yourwebsite.com/blog. Then click Save All Changes.

example of how to change the wordpress theme on a wordpress web page

Source

Change the Theme on a Web Page — Method Two

第二个选项是根据唯一关键字为特定网页或帖子选择一个唯一的主题。该插件将在URL中识别关键字的任何地方搜索您的页面以获取关键字,并应用您选择的主题。

为此,请向下滚动到查询关键字部分,然后在下拉菜单中单击您选择的主题。然后,在框中填写查询关键字。

For example, if you want to change the theme for all testimonials on your site, you could enter Testimonials in the Query Keyword field and add it to every corresponding URL.

如何在WordPress网页上更改WordPress主题的示例

Source

You can also use this option to add a Query Value to have a unique theme added to all URLs that contain your keyword and value.

例如,假设您在网站上有一个博客,并希望将特定主题用于名为Alice的作家。您将输入一个相关的关键字Query Keyword(something like "Blog") and then enterAliceinto the box that says查询值。然后单击保存全部Changes。All of Alice’s posts will have the same theme.

Once you’ve decided how and where you’ll implement your theme(s), you can further customize them inAdvanced Settings。There are options to choose themes that appear on all of your website’s pages, change your website’s main theme, pick which themes are used for specific URLs, and more.

For instance, if you want to add multiple themes to different posts and web pages separately, clickAdvanced Settings, 选择For All Pages and/or Posts,and pick themes individually.

5. Modify and customize your themes.

Modify and customize the themes by heading toAppearance>Theme Options。You’ll find a guide on various ways WordPress allows you to customize your themes and details about how you can view those changes in a preview as well as activate them in a way that meets your specific needs.

如何在WordPress中修改和自定义WordPress主题

Source

It’s important to note that when you apply multiple themes to different pages and posts, your website doesn’t automatically change your current/ active theme. Instead, you’ll have to activate your new theme temporarily to modify and customize it appropriately.

为此,请单击Customizeunder theAppearancetab and modify the theme to your liking. Once complete, save your settings and go back to主题。然后,您可以重新激活旧主题。

6.注意插件的局限性。

与任何事物一样,重要的是要记住多个主题插件的局限性。这将使您可以计划如何在网站上合并主题。

Multiple WordPress Themes on One Domain

Remember, your only options when it comes to using multiple WordPress themes on one domain include changing the theme of your homepage or the theme of one of your web pages or posts by URL or query keyword.

如果您想以任何其他方式更改网站的主题,则必须完全创建一个具有新主题的网站,也就是说,构建一个WordPress中的多站点网络

这在实践中是什么样子

You’ve assigned multiple pages with different themes based on URL or keyword to help streamline your site. So what does this look like in practice?

Consider your homepage. You want this page to stand out, grab attention and help generate visitor engagement. Here, you might want to use something like the Twenty Twenty-One theme which is bold, simple, and to the point

您网站的主页WordPress主题的示例

Source

同时,当涉及产品页面时,您将需要一个旨在展示多个产品的主题,并使用户易于单击并发现更多产品。在这里,值得考虑像店面这样的主题。

Source

It’s also a good idea to include an "About Us” page on your site that offers visitors insight into your mission, values, and goals. Consider using something like the Go theme which is simple and straightforward to help direct user attention exactly where you want it.

关于您的WordPress网站的关于我们WordPress主题的示例

Source

开始在WordPress上使用多个主题

Maybe you want your homepage to have an entirely different look from the rest of your WordPress website. Maybe you want one of your web pages to stand out from your other pages. Or maybe you’re looking to define specific functions for each separate page.

无论出于何种原因,请按照上述步骤在WordPress页面和帖子上实现独特的自定义外观。

Editor's note: This post was originally published in January 2019 and has been updated for comprehensiveness.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

Use HubSpot tools on your WordPress website and connect the two platforms  without dealing with code. Click here to learn more.

最初于6月4日发布于2021年6月7:00 am,更新于6月4日2021年6月4日

主题:

WordPress Themes