0
Welcome Guest! Login
0 items Join Now

Mobile Layout Issues

  • Mobile Layout Issues

    Posted 11 years 1 month ago
    • Hi there,

      I'm having a damn hard time setting up modile functionality to my wordpress theme. I created a site with the basic gantry theme for wordpress but I cannot do the following:

      use a custom taxonomy archive for mobile

      load a custom css for mobile

      show my sidabar in mobile

      Please help!!!
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: Mobile Layout Issues

    Posted 11 years 1 month ago
    • Hi,
      use a custom taxonomy archive for mobile
      Not really sure what you mean, could you please describe it in more details?
      load a custom css for mobile
      To do this you can override the iPhone and Android template files to load a custom stylesheet. First copy the index-iphone.php file from plugin's /tmpl directory to your theme's root directory and open it up. Now find this line:
      </head>
      and add this bit before it:
      $gantry->addStyle('mobile-custom.css');
      Now you can create a file named mobile-custom.css in your theme's /css directory and it will only load on mobile devices.
      show my sidabar in mobile
      On mobile there's not much room to display the Mainbody section with sidebar, so Gantry doesn't output the sidebars. However you can use the other mobile widget position and then use the Position Alias option to display the Sidebar widgets in the Showcase position for example. Please visit this thread to learn more about position alias options: www.rockettheme.com/forum/index.php?f=29...62229&rb_v=viewtopic .
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.
  • Re: Mobile Layout Issues

    Posted 11 years 1 month ago
    • Hi Shazdeh,

      Thanks for your prompt reply. I managed to give a better overall look at my mobile version intsalling a custom css plugin and using media queries. Now I have some doubts.... First of all: why in my gantry settings I have the 'Iphone enabled' switch and not the 'android enabled' one? Right now I have my mobile version displayed by iphones but not by android devices.

      I would like to have my mobile version displayed by all mobile devices. How can I do?

      then, of course I realize that on mobiles there is not enough room for a sidebar....on the side... I would like it to be displayed at the bottom of my content. But I can't find a mobile-bottom position...not in my position aliases, not in my widgets.

      What am I missing?
    • Shazdeh's Avatar
    • Shazdeh
    • Elite Rocketeer
    • Posts: 4984
    • Thanks: 29

    Re: Mobile Layout Issues

    Posted 11 years 1 month ago
    • Hi,
      are you using the default Gantry theme? In the default theme, only the option for iPhone was present. Android specific mobile theme was added later on and so the option does not exists in the older themes. But adding it very simple, you just need a copy of index-android.php file (you can grab it from one of the themes that have it) and also add an option for it in the templateDetails.xml file, right below the line for Enable iPhone option:
      <field name="android-enabled" type="toggle" default="1" label="Android Custom Theme" />
      This adds the option to the theme settings page which you can enable and then Gantry automatically grabs the index-android.php file when a visitor is using an Android device.

      The Mobile Bottom position displays right below the Mainbody. You can alias Mobile Bottom position to the Sidebar so that the widgets inside the Sidebar position are displayed in the Mobile Bottom position.
    • Last Edit: 9 years 10 months ago by cdavis411. Reason: changed typo from "templateDetails,xml" to "templateDetails.xml" (changed the comma to a dot)
    • Please don't PM unless requested ;)
      Consider using the custom stylesheet for all your CSS customizations: gantry-framework.org/documentation/wordp...custom_stylesheet.md .
      Please provide the URL to the issue.
      And please mark the thread as solved if the issue is resolved.
  • Re: Mobile Layout Issues

    Posted 9 years 8 months ago
    • Hi

      So 1 year and 5 months later, I'm trying to do the same thing with Gantry Version: 4.1.25 and the basic template.

      I've done the following:
      To do this you can override the iPhone and Android template files to load a custom stylesheet. First copy the index-iphone.php file from plugin's /tmpl directory to your theme's root directory and open it up. Now find this line:
      </head>
      and add this bit before it:
      $gantry->addStyle('mobile-custom.css');
      Now you can create a file named mobile-custom.css in your theme's /css directory and it will only load on mobile devices.

      However, when it comes to next bit
      ..add an option for it in the templateDetails.xml file, right below the line for Enable iPhone option:
      <field name="android-enabled" type="toggle" default="1" label="Android Custom Theme" />
      This adds the option to the theme settings page which you can enable and then Gantry automatically grabs the index-android.php file when a visitor is using an Android device.

      I find nothing at all for the iphone in the templatedetails file.

      How can I get this to work so that the new css files will be used? I'd be very grateful for an update here, relating to the latest version of gantry.

      Regards
      David
    • Adi

Time to create page: 0.053 seconds