[WordPress] 外掛分享: Specific Content For Mobile – Customize the mobile version without redirections

WordPress 外掛 Specific Content For Mobile – Customize the mobile version without redirections 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「Specific Content For Mobile – Customize the mobile version without redirections」是 2019-08-06 上架。
  • 目前有 5000 個安裝啟用數。
  • 上一次更新是 2025-04-18,距離現在已有 14 天。
  • 外掛最低要求 WordPress 4.6 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 29 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 0%

外掛協作開發者

giuse |

外掛標籤

amp | device | mobile | cleanup | optimization |

內容簡介

「Specific Content For Mobile」外掛可以讓你針對手機版頁面和文章創建特定的內容。若某些頁面需要有不同的內容,這款外掛就非常適合你使用。雖然擁有一個完全回應式的設計是有安裝手機版的最佳方法,但有時候你可能需要為手機版創建特定的內容。

要如何新增或刪除手機版特定內容:
- 點擊管理員主選單中的「頁面」
- 在頁面列表中將滑鼠移至你想要為手機版修改的頁面上,然後點擊「建立手機版本」的動作連結,或點擊設備欄中所見「+」圖示
- 根據需要修改手機版頁面
- 儲存手機版頁面

如果你想為部落格文章創建手機版,也是同樣的方法,只需要進入「文章」列表。

這個外掛會在手機裝置上載入你為該頁面或文章創建的手機版。如果你為一個網站可到達的頁面「https://your-domain.com/page-example/」創建了手機版,而且你已經登錄,你還會看到「https://your-domain.com/page-example-mobile/」。但未登錄的用戶將看不到它,而且唯一存在於公共面前的URL是「https://your-domain.com/page-example/」。頁面在桌面裝置上會顯示桌面版內容,在手機上會顯示手機版內容,而URL則始終保持不變。你不需要任何重定向,這個外掛僅會用手機版內容替換相關桌面版本的內容。

使用本外掛需要注意以下幾點限制:
- 目前版本只支援手機版頁面和文章,不支援自訂文章型態、存檔和術語。
- 如果你使用了一個伺服器快取外掛,請確保為手機裝置設置一個不同的伺服器快取處理。否則,你的頁面的手機版可能也會在桌面裝置上服務。例如,W3 Total Cache、WP Fastest Cache 和 Powered Cache 都是可以處理手機快取的外掛。

此外,這個外掛與AMP(加速移動頁面)外掛不同,並不會生成任何AMP標記,也不需要任何重定向。如果你想提供AMP頁面,「Specific Content For Mobile」是不適合你使用的。在這種情況下,你可能會對AMP或AMP For WP等外掛感興趣。你可以將「Specific Content For Mobile」視為AMP外掛的一種替代方案。

最後,這個外掛默認同步文章元數據。也就是說,當你儲存一篇文章或頁面時,如果它們有一個手機版,相同的元數據將被儲存在手機版中。同樣地,當你儲存手機版時,手機版元數據也會被保存到桌面版中。如果你想改變這個行為,請前往「Specific Content For Mobile」的設置並選擇「允許手機版有不同的元數據」。

原文外掛簡介

Specific Content For Mobile allows you to create pages and posts content designed for mobile devices.
This plugin DOES NOT redirect content from the desktop website: it creates brand new mobile-specific content.
It’s perfect if in some pages you need different content for the mobile version.
The best way to have a mobile version is always a fully responsive design, but in some cases you may need specific content for the mobile version.

How to add or remove specific content for the mobile version:

Click on Pages in the main admin menu
Go with your mouse on the page you want to modify for the mobile version and click on the action link “Create mobile version”, or click on the icon “+” you see in the devices column
Modify your page as you want to see it on mobile
Save your page mobile version

If you want to create a mobile version for your blog posts, do as explained above, but going to the list of Posts.
On mobile devices, the plugin will load the mobile version you have created for that page or post.
If you create the mobile version for a page reachable at https://your-domain.com/page-example/, and you are logged-in, you will see also https://your-domain.com/page-example-mobile/.
But logged-out users will not see it, and the only URL that exists for the public is https://your-domain.com/page-example/.
The page reachable at https://your-domain.com/page-example/ will show the desktop content on desktop devices, and the mobile content on mobile devices The URL is always the same.
You have no redirections, and the plugin just replaces the desktop content with the related mobile version.
For more details read the Documentation.
Requirements
If you have a server cache plugin, be sure to set a different server cache handling for mobile devices, in another case the mobile version of your pages could also be served on desktop devices.
E.g. W3 Total Cache, WP Fastest Cache, and Powered Cache are caching plugins that can handle the mobile cache.
Be careful if you are using W3 Total Cache or whatever other caching plugin that gives you the possibility to manage the mobile version, DO NOT set up any redirection for mobile devices.
If you have issues with the mobile and desktop versions with W3 Total Cache, read Mobile version showing in desktop view – W3 Total Cache Plugin
Specific Content For Mobile DOES NOT redirect the mobile users. The URL of a page visited on mobile is exactly the same as the desktop URL.
Differences with AMP plugins
Specific Content For Mobile has nothing to do with AMP pages. It gives you the possibility to show specific content for mobile, but without any redirection, and without generating any AMP markup.
If you want to serve AMP pages, Specific Content For Mobile is not for you. In that case, you may be interested in a plugin like AMP, or AMP For WP.
You consider Specific Content For Mobile like an alternative to AMP plugins.
Limitations of the free version
The free version supports only the mobile version of pages and posts, no custom post types, no archives, no terms.
Additional information
As a default, WordPress doesn’t output the blog page content before the posts loop.
Some themes do it. In this case, the blog page content output before the loop is handled by the theme templates.
The plugin will check if the theme declares support for the blog page mobile version, if not so the blog page mobile version may take the original desktop content.
As a default Specific Content For Mobile synchronizes the post metadata. This means that when you save a post or page, if they have a mobile version, the same metadata will be saved in the mobile version.
When you save a mobile version, the mobile version metadata will be saved also in the desktop version.
If you want to change this behavior, go to Specific Content For Mobile settings and choose “Allow mobile versions having their own metadata”.
For the most popular SEO plugins, you can choose the metadata synchronization specifically for that plugin.
PRO Version
The PRO version also allows you to:

Have a mobile version of all the queriable post types are supported
Load a different theme specifically on mobile devices
Unload specific plugins only on mobile devices
Decide if tablets should be considered as mobile devices or not so
Have a different navigation on mobile
Write specific content depending on the device
Have access to the premium support

For developers
Template for mobile
If you need to use a different template file on mobile, copy the template file of your theme and put it in one of these folders:
wp-content/scfm/
wp-content/themes/theme-name/scfm
For example, if your theme is “theme-name” and you want to load a different page.php on mobile, it will be something that looks like:
wp-content/scfm/page.PHP
or
wp-content/themes/theme-name/page.php
In the case of mobile devices, Specific Content For Mobile will look for the custom template file first in wp-content/themes/theme-name/scfm and if it doesn’t find it in wp-content/scfm.
Integration with other plugins
If you add an option for the metadata synchronization of an external plugin, you can use the filter “eos_scfm_meta_integration_array”.
Here an example:
add_filter( 'eos_scfm_meta_integration_array','my_custom_scfm_meta_integration',20,2 );
//It adds an option to synchronize your plugin meta data.
function my_custom_scfm_meta_integration( $arr,$options ){
$slug = 'my_custom_meta';
$arr[$slug] = array(
'is_active' => defined( 'WPSEO_FILE' ),
'args' => array(
'title' => __( 'My custom meta synchronization','my-textdomain' ),
'type' => 'select',
'value' => isset( $options[$slug] ) ? esc_attr( $options[$slug] ) : 'synchronized',
'options' => array(
'synchronized' => __( 'Synchronize desktop and mobile metadata','my-textdomain' ),
'separated' => __( 'Allow mobile versions having their own metadata','my-textdomain' )
),
),
'prefix' => array( '_my_plugin' ),
'default' => 'synchronized'
);
return $arr;
}

Then you will see your custom option “My custom meta synchronization” in the main settings page.
Helper functions
In your theme, you can use the following functions to give full support to the mobile version content:
eos_scfm_related_desktop_id( $post_id );

given the post ID, it will get the post ID of the related desktop version.
eos_scfm_related_mobile_id( $post_id );

given the post ID, it will get the post ID of the related mobile version.
Theme support
To add the theme support to the blog content, you can add this line in your theme support action hook:
add_theme_support('specific_content_form_mobile',array( 'posts_page' => true ) );

Help
If something doesn’t work on the free version, open a thread on the support forum
If you are a PRO user, and you have issues, don’t hesitate to open a ticket on the premium support

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Specific Content For Mobile – Customize the mobile version without redirections」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.0.1 | 0.0.2 | 0.0.3 | 0.0.4 | 0.0.5 | 0.0.6 | 0.0.7 | 0.0.8 | 0.0.9 | 0.1.0 | 0.1.1 | 0.1.2 | 0.1.3 | 0.1.4 | 0.1.5 | 0.1.6 | 0.1.7 | 0.1.8 | 0.2.0 | 0.2.1 | 0.2.2 | 0.2.3 | 0.2.4 | 0.2.5 | 0.2.6 | 0.3.0 | 0.4.0 | 0.4.1 | 0.5.0 | 0.5.1 | 0.5.2 | 0.5.3 | 0.5.4 | trunk | 0.1.8.1 | 0.1.8.2 | 0.1.8.3 | 0.1.8.4 | 0.1.8.5 | 0.1.8.6 | 0.1.8.7 | 0.1.8.8 | 0.1.8.9 | 0.1.9.0 | 0.1.9.1 | 0.1.9.2 | 0.1.9.3 | 0.1.9.4 | 0.1.9.5 | 0.1.9.6 | 0.1.9.7 | 0.1.9.8 | 0.1.9.9 | 0.1.9.6.beta-1 |

延伸相關外掛(你可能也想知道)

  • AMP 》「Page Experience」(PX)是一組排名訊號,包括「核心網頁素質」(Core Web Vitals,CWV),用來測量使用者與網頁互動的使用體驗。AMP 是一個強大的工具,能...。
  • Head, Footer and Post Injections 》關於 WordPress SEO 和 Facebook Open Graph:我對 Yoast 的邀請讓我刪除我的外掛非常不滿,但實際上並不需要。, 點擊此處了解更多。, 頁首和頁尾代碼, 為什...。
  • Ad Inserter – Ad Manager & AdSense Ads 》這是一款廣告管理外掛程式,具有多種進階廣告功能,可在最佳位置插入廣告代碼。, 支援各種廣告,包括 Google AdSense、 Google Ad Manager (DFP - DoubleClic...。
  • Schema & Structured Data for WP & AMP 》d-data-for-wp.com/docs/article/how-many-schema-types-do-we-support/" rel="nofollow ugc">查看所有支援的類型,目前已支援超過35種類型,其中包括部落格...。
  • Web Stories 》Web Stories 是一種免費、開放網絡的視覺故事格式,讓您能夠輕鬆地創建具有引人入勝的動畫和可點擊互動的視覺敘事,並讓讀者沉浸在優美且快速加載的全屏體驗...。
  • Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads 》:, 傳說中的 WPQuads Ads 外掛程式現已以現代方法回歸提供廣告解決方案。WP QUADS 經過精簡編碼,不會造成過度負擔,被大型網站使用,每月的頁面點擊率達到...。
  • Glue for Yoast SEO & AMP 》Yoast SEO AMP 外掛現在已不再需要。通過與 Google 的良好協作,這個外掛的功能現在已經包含在 Yoast SEO 和官方 AMP 外掛中。如果您仍在使用這個外掛,建議...。
  • Push Notifications for WP – Self Hosted Web Push Notifications 》Push Notifications for WP & AMP 提供方便的方式免費向使用者發送 Web Push 通知,並且只需 2 分鐘設定。 此為使用說明文件。, 當文章發佈或更新時,自...。
  • Easy Google AdSense 》Easy Google AdSense外掛為 WordPress 使用者提供了在網站上使用 Google AdSense 的更簡單方法。使用這個外掛,您無需手動將 AdSense 廣告/程式碼添加到網站...。
  • Push Notifications by LaraPush 》以下是LaraPush這篇文章的摘要:, , LaraPush是一個自主託管的推送通知平台,只需一次性付費即可添加無限的域名、收集無限的訂閱者、無限制地發送通知。此外...。
  • Easy Google Adsense and Banner Ads Manager – AdsforWP 》AdsforWP 是一個針對 WordPress & AMP 所建立的 Google 廣告和 Banner 廣告外掛程式。易於使用、無限的嵌入式廣告、支援 Adsense、高級功能等等。, 公告,...。
  • Progressive WordPress (PWA) 》在 WordPress 網站中添加漸進式網路應用程式 (PWA) 功能從未如此簡單。甚至支援 Accelerate Mobile Pages (AMP),也與OneSignal相容!, 添加到主屏幕, 提供一...。
  • easy AMP 》ist and adds them to your AMP pages if they meet the requirements., The WordPress AMP Plugin for WP provides an easy and free solution to create AM...。
  • MakeStories (for Google Web Stories) 》MakeStories 是一個視覺化的拖放式編輯器,可用於創建 AMP-Stories。這款外掛可以幫助你從 WordPress 儀表板中一鍵將 Google 網絡故事直接發佈到你的網站上。...。
  • Chartbeat 》Chartbeat for Publishing 可以即時顯示您的網站和應用程式的網路流量和觀眾資料,並協助您追蹤重要的趨勢。如果您有 Chartbeat 的訂閱,您可以使用此外掛自...。

文章
Filter
Apply Filters
Mastodon