Home › Forums › Weaver Xtreme Theme › Hide #inject_postheader
- This topic has 11 replies, 3 voices, and was last updated 1 month, 1 week ago by
Yvonne.
-
AuthorPosts
-
August 12, 2023 at 08:32 UTC - Views: 61 #73265
Yvonne
ParticipantHow to hide / disable the display of the #inject_postheader area on mobile devices?
August 12, 2023 at 16:24 UTC - Views: 54 #73266scrambler
ModeratorYou can use the SHow/hide shortcode around the content of the box
[hide_if device =mobile] your content [/hide_if]
August 12, 2023 at 17:23 UTC - Views: 51 #73267Yvonne
Participant[hide_if device=mobile][widget id=”block-15″][/hide_if]
DOESN’T WORK. and in addition there are code snippets on the page
August 12, 2023 at 17:23 UTC - Views: 50 #73268Yvonne
ParticipantAugust 12, 2023 at 21:28 UTC - Views: 48 #73269scrambler
ModeratorCan you try with jus text instead of a shortcode to see if that works. Copy paste the one below as is (it works on my site)
[hide_if device=mobile] HIDE IF IN POSTHEADER [/hide_if]
If that works, RETYPE your shortocde in place of the text (keep everything else)
Also what plugin is behind the widget shortcode?
August 16, 2023 at 11:18 UTC - Views: 35 #73275Yvonne
ParticipantYour code only worked because there was text instead of shortcode. Unfortunately, the code itself is still visible on the site.
the shortcode I inserted was responsible for a third-party slider (Content View)August 16, 2023 at 16:02 UTC - Views: 31 #73276scrambler
ModeratorI tried a show post shortcode inside mine and it worked too.
So I wonder if there is a problem with that plugin.
Can you try to put a Showpost shortcode inside the hide_if one and see if that work?
This would confirm it is a plugin issue.
@weaver can a plugin shortcode placed inside a hide_if cause the hide_if to be displayed as text?In the mean time you can hide that area on mobile with the Custom CSS below
.is-mobile #inject_postheader {display:none;}
August 18, 2023 at 13:12 UTC - Views: 23 #73279Yvonne
ParticipantEverything works. It helped. Thank you
August 18, 2023 at 18:41 UTC - Views: 22 #73284Weaver
KeymasterSorry, just got back to my dev site to check this.
The [show/hide_if] shortcodes only wrap the content in a <div > with a show or hide class. So if there is a shortcode inside, it will depend on how the short code works. Plain old text should be shown/hidden as one would expect. But a shortcode that perhaps uses JavaScript would likely just display anyway.
August 18, 2023 at 19:11 UTC - Views: 21 #73285scrambler
ModeratorThe strange thing is that with her shortcode, it displayed Nothing AND it showed the show_if shortcode as text, which looks very much like the content filtering bug you fixed a while back, where most shortcode would do that.
SO I am wondering if something in the shortcode she used may be still triggered the filtering problem.
For reminder this is what her shortcode looked like
[hide_if device=mobile][widget id=”block-15″][/hide_if]
Dont know if the double quotes were messed up by the forum or her….
@sariwo
, when you had your shortcode above was it using the bad curly / slanted double quotes, or the proper straight ones like below
[hide_if device=mobile][widget id="block-15"][/hide_if]
August 18, 2023 at 21:54 UTC - Views: 16 #73286Weaver
KeymasterI don’t have a [widget] shortcode plugin installed, but just entering the above [hide_if] examples, with or without the normal “, it does get hidden on mobile on my dev site.
August 19, 2023 at 10:57 UTC - Views: 8 #73288Yvonne
Participantguys, it’s possible that I have some conflict on the page that breaks hiding sections using your [hide_if] code. Yes I had this problem before, I reinstalled everything and the problem persisted. The custom CSS code is now working. It did its job and I thank you for that. It is enough for me.
-
AuthorPosts
- You must be logged in to reply to this topic.