Different code insection for desktop and mobile versions

Posted in: Newspaper
Post count: 23

I would need to have two codes <head> </head> script insection code, one for mobile devices and other for desktop devices.

I am optimizing the loading of scripts, and I would like the mobile scripts to only load in mobile version, and desktop scripts only load in desktop version

I use the Mobile Theme

Thanks!

Post count: 23312

Hi,

Please note that our theme has two different header.php folders for Desktop version and Mobile theme, like this -> https://www.screencast.com/t/hQlhnFsVNbKv -> https://www.screencast.com/t/k3XijmDuQ

Hope this helps!

Thank you!

Post count: 23

I work with the structure Themes/Newspaper-child, in the Desktop version it works well working from that direction.
But in the mobile version I can not find the way to make that modification (I do not want to modify the original files in plugin/td-composer/mobile/head.php), try with this structure /Newspaper-Child/mobile/head.php and it did not work.

Thanks

  • This reply was modified 7 years by CRiTiCAL.
Post count: 460

Hi Critical,

Sorry to intrude.

I love the loading speed of Newspaper with mobile (plugin tagdiv mobile active), but this rome the home, categories, etc …

So I was thinking about a hybrid. Responsive for home, categories, etc… and mobile plugin for post.

All my traffic (95%) comes from mobile and for me it is important to maintain a high loading speed and not use more scripts than necessary.

I think you’re working on something similar, optimizing the load, is that so? Do you think we could collaborate? my email is info@soyunperro.com

Post count: 20688

Hi,


@CRiTiCAL
That won’t work in a child theme. Currently the only way of loading code in the mobile header is to manually add it in the file mentioned above. I will make a note of this and it will be considered to add a field for it in the theme panel mobile theme settings.


@Jose
That is an interesting suggestion, so something to allow the user to enable/disable the mobile theme for all the categories, posts, pages etc. There will be an option to choose for which pages or posts the mobile theme applies specifically, as an option in the edit screen. I will add this suggestion and it will be strongly considered by our developer team. Thank you for mentioning it.

In the coming theme updates there will be quite a few options added for the mobile theme. These are currently in work, some in testing. All suggestions are welcome. Please let us know if you have more suggestions.

Thanks

Post count: 460

Thanks Simion C. and team,

That sounds really fantastic, I’m already excited waiting for a new update.

Have a nice week, Jose

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.