Home Forums Weaver Xtreme Theme Hide #inject_postheader

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #73265
    Yvonne
    Participant

    How to hide / disable the display of the #inject_postheader area on mobile devices?

    #73266
    scrambler
    Moderator

    You can use the SHow/hide shortcode around the content of the box

    [hide_if device =mobile] your content [/hide_if]

    #73267
    Yvonne
    Participant

    [hide_if device=mobile][widget id=”block-15″][/hide_if]

    DOESN’T WORK. and in addition there are code snippets on the page

    #73268
    Yvonne
    Participant
    #73269
    scrambler
    Moderator

    Can 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?

    #73275
    Yvonne
    Participant

    Your 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)

    #73276
    scrambler
    Moderator

    I 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;}

     

    #73279
    Yvonne
    Participant

    Everything works. It helped. Thank you

    #73284
    Weaver
    Keymaster

    @scrambler:

    Sorry, 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.

    #73285
    scrambler
    Moderator

    The 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]
    #73286
    Weaver
    Keymaster

    I 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.

    #73288
    Yvonne
    Participant

    guys, 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.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.