Jump to content

Archived

This topic is now archived and is closed to further replies.

pazyluz

hide some pages, display others

Recommended Posts

pazyluz

I've created a webpage specifically for mobile phones.  now I'd like to hide that page from desktops and certain browsers.  On the page made for mobiles, I'd like to hide many of the pages made for non-mobiles.  I THINK the problem I'm having is finding the correct selector for pages, for which I've tried a hundred variations.  Below is SOME of the code I've tried that hasn't worked:

 

body.desktop body.ipad body.firefox body.chrome body.ie body.opera .page-id-466 {
  display: none !important;
}
 
body.mobile #page-id-420 #page-id-5 #page-id-313 #page-id-191 {
  display:none;
}
 
.hidden-phone {
.page-id-420;
.page-id-5;
.page-id-313;
.page-id-191;
}
 
Any help appreciated.
 
Mobile Page is attached to details theme made in DMS1

 

Share this post


Link to post
Share on other sites
Aires

Hi , pazyluz

 

Are you trying to hide the menu items to prevent the user from clicking on it or the page entirely on mobile.

Both of which can be done with media queries but if you  hide the page this way it will just give you a blank page all the content will not be visible but the user can still view it.

 

~Aires 


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

As Aires, as stated we are going to need to know exactly what you're trying to hide i.e. your navigation menu items for those pages. Also, the code you have wrote above isn't valid code, you can not use CSS like that.

 

Also, please be aware that you can not use CSS to stop pages from being loaded in a mobile browsers, if that is what you intended with that code above.

 

 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pazyluz

Aries and Danny, thank you for responding.

 

I would like to display the mobile menu on mobile phones. Yes, on mobiles, I am trying to hide the  "Secondary Navigation Menu" for the full/desktop site which displays in the footer of the full site. (I do believe I have managed to hide that footer nav on mobiles but have not been able to hide the "Secondary Navigation Menu" that displays when you click on the 3-bar "menu" in the upper right corner of mobiles.) 

 

I am also playing around with the YAMS plugin, free version, which allows you to select the menu you wish to display. 

 

After resolving the display issues above,

the next step will be to redirect mobile browsers to the mobile menu pages, and specifically to the landing page now called "Mobile."  

I am looking into various plugins and need to be able to both choose a menu and select the landing page and/or order of pages to display.  But maybe there's a better way or a "best practice."  Any guidance deeply appreciated.

 

Yes, btw, I was trying to hide specific pages on mobiles with css. (No wonder it didn't work!)

 

Merry Christmas, you two!  Thanks for all your help. 

 

http://peggygreen.net

Details theme

DMS1

Share this post


Link to post
Share on other sites
Danny

The Mobile menu should already display on mobile phones, as its a mobile menu?

 

If you do not want to use Secondary menu, then simply do not use select a Menu for the secondary option.

 

I have no experience nor even heard of a plugin called YAMS before. However, if you're having issue using that plugin, you will want to contact their support.

 

If you wish to redirect users from a mobile device to a specific page, you will need to ask this question on the WordPress support forums, as this isn't related to DMS.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Aires

Hi pazyluz,

 

If you are using YAMS then I would suggest you try a different plugin. That particular plugin was made is by Nick Haskins and I dont think he has any plugins in the store any more. 

 

But I do see it on my account page which is weird. Then again I may be wrong.

 

http://betterdms.com/wp-content/uploads/2013/09/Y.A.M.S-Lite.png

 

Just a suggestion.


ndTgvai.jpg

Visit iheartpagelines.com for the latest tutorials on PageLines related products.

 

Share this post


Link to post
Share on other sites
pazyluz

Aries, Danny, I've got that part sorted out now, thank you.  changes weren't showing up because of hosts use of NGINX.  if you add /?nocache=1  to the end of your site's url, you can work on an uncached copy, and the changes actually save.  

 

I have one remaining question about all this, and that is how to redirect mobile users to a different page than my site's home page.  IF that is specifically a wordpress issue, I'll go there.  Any advice appreciated meantime

Share this post


Link to post
Share on other sites

  • Similar Content

    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
    • stijnxo
      By stijnxo+
      Is there a way to disable the responsive function of your iBoxes?
      I do not want all iBoxes underneath each other on mobile, is there a way to fix columns or group boxes?
      I use them for small links and want them to stay next to each other, see attachment
      Please let me know.



    • Dan Haddock
      By Dan Haddock
      Plugins Active and installed: 
      Akismet Anti-Spam
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools  
      Enhanced Media Library  
      Flamingo
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap
      Jetpack by WordPress.com
      Legull 
      Loginizer   
      MailChimp for WordPress
      PageLines Updater    
      Schema App Structured Data 
      Sucuri Security - Auditing, Malware Scanner and Hardening
      Uber reCaptcha    
      Yoast SEO
      Wordpress Version: 4.8.1
      Pagelines Version: 2.2.4
       
      Good Evening/Afternoon or Morning, 
      I am running into a problem with CSS styling not applying inside of most browsers (Safari, Firefox) when I am logged in to wordpress, and all browsers that I have tested when I am logged off and the site has been made public (Chrome, Firefox and Safari).
      As a result, I have managed to identify the probable cause. It looks as though these browsers are refusing to render my sites compiled CSS file due to it being a HTTP URL rather than HTTPS.
      I have attempted to change this URL to HTTPS in my browser, however it brings back an ERROR: File not found page - https://www.shortfilmblog.com/wp-content/uploads/pagelines/compiled-css-core-1505847507.css
      What would you suggest in this regard? Would this be resolvable from your end?
      Happy to provide any further details required.
    • Borries
      By Borries+
      I know this is not an easy problem. Maybe there is a easy solution.
      I have tryed to uses the existing solution, that I have found in the forum
      I changed the colours of my nav (simple nav) and the hover effect (a. hover).
      I really tryed to highlight the active/used link in the nav but I cant figure it out.
      I want it to be black when active.
      Any help would be appreciated. Thanks.
      http://www.marcborries.de  nav link: "Sinn & Selbst" 
    • lionel1
      By lionel1
      Hi,
      I use on my home page " impulse module " but when i look on my iPhone the image is cut and not responsive .
      i only have this problem with this module not with the other one .
      thanks for ur help
      website / www.elonakane.com 
      Lionel 
       
×