Hi @kp
even though ACF is a very popular plugin, I’ve never tested SCFM with ACF, so I can’t tell you anything sure. I will just tell you how SCFM works, and then you will draw your own conclusions.
As you have probably read, with SCFM you can create the mobile version of a page.
Then when the user visits the page on mobile, SCFM replaces the content of the desktop page with the content of the mobile page.
The replacement is made on the server with PHP. Both the content of the desktop page and mobile pages are stored in the database.
Even if ACF is so popular, I’ve never used it, so correct me if I write something, not right.
As I know, if you use ACF, you add the output of the custom fields in your custom template files.
The actual official version of SCFM doesn’t manage template files, but the next version that will be public soon will do it.
If you want you can test the beta version, you can download it from here: https://downloads.wp.xz.cn/plugin/specific-content-for-mobile.0.1.5.2.zip
With the beta version, which I hope will become soon the next official version, you can load a different template file depending on the device.
To do so, you should have the template file in the folder wp-content/themes/your-theme/scfm/ or in wp-content/scfm/
Let’s do an example. Imagine you have the template file page.php in wp-content/themes/your-theme/scfm/page.php
Then when you visit the page on mobile SCFM will replace the usual page.php template with that one included in wp-content/themes/your-theme/scfm/
So, I suppose with the next version of SCFM you will have full flexibility, and using ACF should not be a problem.
You may need the following situations on mobile and desktop:
1) Different type of custom fields
2) Same type of custom fields and same values
3) Same type of custom fields, but different values
1) So, if you use ACF, and you would like to have different fields on mobile, you could include your custom fields for mobile in the “mobile” template files.
2) If the custom fields should be the same both for mobile and desktop, you don’t need additional template files for mobile.
In the SCFM settings in “Metadata synchronization” you should chose “Synchronize desktop and mobile metadata”
3) As to point 2) but in the SCFM settings you should select “Allow mobile versions having their own metadata”.
But, probably you will have some fields that should have the same values, and other ones a different value.
If so, you can add a dedicated option for your custom field using the filter “eos_scfm_meta_integration_array”
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' => class_exists('ACF'),
'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;
}
Using that filter, you will add a dropdown list in the settings page of SCFM that you can use to decide between synchronizing the meta values between desktop and mobile or allowing mobile versions to have their own meta value.
I hope it helps.
At the moment ACF isn’t one of the first priorities for SCFM, because I have seen that the typical user of SCFM doesn’t use ACF, and I will not test it soon. But if you test it and you find issues, don’t hesitate to report them here.