Specific Content For Mobile – Customize the mobile version without redirections

Por Jose Mortellaro
(29 avaliações)
Baixar
  • Versão:
    0.4.0
  • Última atualização:
    há 11 dias
  • Instalações ativas:
    mais de 6 mil
  • Versão do WordPress:
    4.6 ou maior
  • Testado até o WordPress:
    6.7
  • Versão do PHP:
    5.6 ou maior
  • Tags:

Hospedagem WordPress com plugin Specific Content For Mobile – Customize the mobile version without redirections

Onde devo hospedar o plugin Specific Content For Mobile – Customize the mobile version without redirections?

Este plugin pode ser hospedado em qualquer provedor que tenha WordPress instalado. Recomendamos escolher um provedor de hospedagem de confiança, com servidores otimizados para WordPress, como o serviço de hospedagem da MCO2.

Hospedando o plugin Specific Content For Mobile – Customize the mobile version without redirections em uma empresa de hospedagem confiável

A MCO2, além de configurar e instalar o WordPress na versão mais nova para seus clientes, oferece o plugin WP SafePress, um sistema exclusivo que assegura e otimiza seu site ao mesmo tempo.

Por que a Hospedagem WordPress funciona melhor na MCO2?

A Hospedagem WordPress funciona melhor pois a MCO2 possui servidores otimizados para WordPress. A instalação de WordPress é diferente de uma instalação trivial, pois habilita imediatamente recursos como otimização automática de imagens, proteção da página de login, bloqueio de atividades suspeitas diretamente no firewall, cache avançado e HTTPS ativado por padrão. São plugins que potencializam seu WordPress para a máxima segurança e o máximo desempenho.

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

Capturas de tela

Pages

Pages

Metadata synchronization

Metadata synchronization

Custom metadata synchronization (for developers)1. Pages and posts list screen

Custom metadata synchronization (for developers)1. Pages and posts list screen

Plugins semelhantes

AMP
(368 avaliações)

Um caminho mais fácil para uma ótima experiência de página para todos. Desenvolvido por AMP.

Ad Inserter – Gerenciador de publicidade e anúncios do AdSense
(2.320 avaliações)

Gerencie o Google AdSense, Media.net, banners da Amazon, ads.txt, rotação de anúncios, widgets fixos, anúncios AMP, DoubleClick for Publishers (DFP), rastreamento, código de cabeçalho e rodapé do AdSense

Advanced Database Cleaner
(1.504 avaliações)

Limpre o banco de dados excluindo dados órfãos como 'revisões', 'transientes', otimizando o banco de dados e mais...

Advanced Ads – Gerenciador de Anúncios e AdSense
(1.416 avaliações)

The only complete toolkit for all ad types. Grow your revenue with AdSense, Amazon—or any affiliate network. Get pinpoint targeting and best support!

AMP for WP – Accelerated Mobile Pages
(1.308 avaliações)

AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your …

WP-Sweep
(132 avaliações)

WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It also optimizes your database tables.

Do mesmo author (Jose Mortellaro)

Freesoul Deactivate Plugins – Disable plugins on individual WordPress pages
(97 avaliações)

Load plugins only where you need them. No bloat, no conflicts, more speed. Deactivate plugins where they don't add anything useful.

Lazy Load Control For Elementor – Remove the Lazy Load attribute from specific images in Elementor
(15 avaliações)

Remove the Lazy Load attribute from specific images in Elementor.

Content No Cache: prevent specific content from being cached
(19 avaliações)

Serve updated dynamic content even when you add it to a page that is cached.

Essential Form – The lightest plugin for contact forms, ultra lightweight and no spam
(13 avaliações)

The lightest contact form for WordPress. It's so essential you'll either love it or hate it. Ultra lightweight and no spam.