[WordPress] 外掛分享: Each domain a page

首頁外掛目錄 › Each domain a page
WordPress 外掛 Each domain a page 的封面圖片
200+
安裝啟用
★★★★★
5/5 分(8 則評價)
105 天前
最後更新
0%
問題解決
WordPress 6.2+ PHP 5.6+ v1.8.1 上架:2019-09-25

內容簡介

這個外掛程式可以讓您從一個 WordPress 站點輕鬆管理大量落地頁面或單頁網站。(對於多站點,請使用 Multisite Landingpages)

該外掛程式旨在讓您從 WordPress 站點將不同的域名映射到不同的落地頁面,這樣您就可以輕鬆地從單個 WordPress 安裝中維護大量小型網站。

您不需要進行任何設置,它可以無需調整立即使用。

只需將您擁有的域名指向您的 WordPress 安裝。在 WordPress 中,為該域名創建一個頁面。該 slug 應為不帶 ‘www’ 的域名,點號換成連字號。

您可以在我的網域 wordpresscoder.nl 上看到它正在發揮作用,它在我的 joerivanveen.com 博客(joerivanveen.com/blog/wordpresscoder-nl 是相同的)上顯示一個特殊頁面,該頁面的 slug 是 ‘wordpresscoder-nl’。

好處:

您的網站其餘部分仍像往常一樣運作。

您可以在多個域名上輕鬆重複使用和維護元素,例如表單。

使用多個域名的落地頁面輕鬆帶來更多流量。

注意點:

單頁網站都看起來與您的主要網站相似,如果您需要更多的靈活性(和更多的工作),請使用 WordPress Multisite。

有些主題使用 webfonts,為了讓它們正常工作,需要在您的 .htaccess 中添加幾行代碼,這些代碼都有標記 #ruigehond007(這是我的第七個外掛)。

目前它無法用於自定義文章類型,僅限於常規頁面和文章。

如果您的博客是主站的子文件夾(例如 my-site.com/blog),則需要進行額外的設置,請參閱安裝說明。

我特別注意使這個外掛程式非常輕量級,您會注意到它對您的安裝速度幾乎沒有任何影響。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.8.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Each domain a page」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Easily manage a large number of landing pages or small websites from a single WordPress site.
This plugin offers an easy way to map different domains to different landing pages on your WordPress site. Now you can easily maintain a large number of small sites from a single WordPress installation.
You don’t have to set anything up, it works out of the box.
Just point a domain that you own to your WordPress installation. In WordPress, create a page for that domain. The slug should be the domain name without ‘www’ and with the .’s replaced by hyphens.
You can see it working on my own domain: wp-developer.eu, which shows a special page with slug wp-developer-eu on my joerivanveen.com blog (joerivanveen.com/blog/wp-developer-eu is the same).
Benefits:

Easily reuse and maintain elements like forms on several domains at once.

Bring in more traffic using landing pages for multiple domains without hassle.

Favicon support for each domain, fallback from child pages to parents.

Support for custom post types, e.g. FAQ posts, portfolio posts.

The rest of your website keeps working as usual.

Caveats:

Some themes use webfonts, for them to work a couple of lines are added to your .htaccess, these are clearly marked #ruigehond007 (this is my seventh plugin).

If your blog is in a subfolder of the main site (e.g. my-site.com/blog) you need to take an extra step for this to work, see installation tab.

Not all custom post types are guaranteed to work as landing page, e.g. WooCommerce products need additional work to be able to access the main cart.

If you need more flexibility (and more work) there is WordPress Multisite.

I put special care in making the plugin very lightweight, you will notice it has virtually no effect on the speed of your installation.
Favicons
Switch on with_favicon on the settings page, to allow adding favicons to each landing page (and other pages and posts as well).
Supplying the correct favicon(s) is your responsibility, the plugin will not verify their validity.
As a rule of thumb I would use a small(ish) SVG for modern browsers, and a 32×32 pixel ICO file as fallback.
You may need a plugin to be able to upload ICO and SVG files, since they are blocked by default.
.htaccess
In case the plugin was not able to update your .htaccess, these are the lines for your .htaccess to make webfonts function properly, you can add them right after ‘#END WordPress’:
# BEGIN ruigehond007


Header set Access-Control-Allow-Origin "*"


# END ruigehond007

You may need to switch on headers module in your Apache configuration, if it is not already.
NGINX
NGINX does not process .htaccess files as standard. Best is to add the following to your nginx.conf file:
location ~* \.(eot|ttf|otf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}

Alternatively you can switch on processing of .htaccess files in your nginx.conf file. In your hosting environment this may be done by disabling ‘direct delivery’ or something similar.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon