Site logo

Archived topic

How to create a MOBILE ONLY link

14 replies · Started by albabes on April 2, 2017

Viewing posts 1–15 of 15

Hi Tom
How do I create a "mobile only" text link? Or, what do I use in GP Premium to accomplish that? I want the link to be centered, "above the Content" area, below the nav bar.

I have it up now on Dbsatucson.org

Thanks
Tom

Looks like you almost got everything?

If you want that "Meetings" link to only show on mobile, then you can add the hide-on-desktop and hide-on-tablet classes into the div like this: <div style="text-align:center" class="hide-on-desktop hide-on-tablet">

Let me know if this answers the question.

Hey thanks Leo

So this means ".hide-on-desktop hide-on-tablet" is on GP's css file?

I way behind on Ccs5 mobile, damn

Didnt work Leo. Still shows on Desktop. Dont have a tab, so cant chk those.

Using

<div style="text-align:center" class="hide-on-desktop, hide-on-tablet">
<a href="/meetings/">Meetings</a>
</div>

Also tried with out the COMMA

<div style="text-align:center" class="hide-on-desktop hide-on-tablet">
<a href="/meetings/">Meetings</a>
</div>

Nor can I find either
.hide-on-desktop
.hide-on-tablet
in either css files?

Just checked your site and it's working for me. Maybe try clearing browser cache?

Shit your right. I even did a Ctrl | refresh button, to both FF and Chrome, to clear em. Not work.
Then I closed both, reopened em, and it was working.

Cache is getting baffling these days.

Thanks Leo

PS. Why am I not finding the classes in either css files?

Yeah caching can be a pain.

It should be in the unsemantic-grid.min.css file.

Glad I could help!

Have never seen a file "unsemantic DOT anything" in any of the WP GP child theme?

Ftp only?

Should be in wp-content > themes > generatepress > css.

But not Accesible via /wp-admin ?

Don't think so as they are two separate directory.

Thanks much Leo.

You're welcome!

This archived topic is closed to new replies.