problems with extra header

open (8 posts) (2 voices)

  1. Hello Guys,

    I need to customize my content for phone, tab and desktop. therefor i installed "wp mobile detect". It works great.

    Now i need to add content (polylang shortcode) to the extra header. This works also great. The next step is to activate the extra header for mobile devices. I did that as recommended by adding custom css:

    .mysite_responsive #header_extras {
    display: block !important;}

    Now the content is shown on desktop and mobile devices.

    As next step i want to deactivate the showing only for phone. tab and desktop shall see the content, phone not. Therefore i use "wp mobile detect" shortcode [notphone][/notphone]. But this doesn't work. Thatswhy i tested with the MSMW shortcode [only_desktop][/only_desktop] to see, if this shortcode works, but it does´t.

    Can anyone give me an explanation and a solution. Is the custom css the problem or why are shortcodes not executed that try to hide content on specific devices?

    I made some screenshots for a better understanding:

    Attachments

    1. on_tablet.jpg (94.9 KB, 0 downloads) 1 year old
    2. on_phone.jpg (63.6 KB, 1 downloads) 1 year old
    3. on_desktop.jpg (95.7 KB, 3 downloads) 1 year old
    Posted 1 year ago #
  2. OnePressTech
    Member

    Try the following to only turn this on for screen larger than a mobile/cell phone:

    @media only screen and (min-device-width: 500px){
    .mysite_responsive #header_extras {
    display: block !important;}
    }

    Posted 1 year ago #
  3. Hello OnePressTech,

    i tired. Your are right, the language changer disappears phones and is still available on tabs and desktops. But: the normal phone view is now broken. With the custom css you recommended, the desktop and tab version appears on a phone not the phone version i created. I can see that because of the marking red arrows. So i need an other idea or a customization of the last idea.

    A second idea, i would like to follow parallel is to put the language switcher into the intro above each page. I tested that and it is ok in my opinion, but: I am not able to display the intro on the start page. Do you have an idea?

    Regards
    Colin

    Attachments

    1. phone_working.jpg (75.8 KB, 2 downloads) 1 year old
    2. phone_broken.jpg (75.5 KB, 1 downloads) 1 year old
    Posted 1 year ago #
  4. OnePressTech
    Member

    I would switch from using "Extra Header Text" to using "Additional Headers" section in the theme admin. You can add some html there and move it around using the Custom CSS section.

    You can see an example of flag placement in the header at https://upledger.com.au (one of my clients). Just display the page html and you can see the additional html and css.

    Posted 1 year ago #
  5. In the additional header the shortcode for polylang doesn't work. See the screenshot.

    The idea i have is to use the "intro". Meanwhile i changed the appearance that way and it works great. Unfortunaltety I have no option to activate the intro for the start site.

    Do you have an idea?

    Regards
    Colin

    Attachments

    1. 02.jpg (91.5 KB, 1 downloads) 1 year old
    2. 01.jpg (94.6 KB, 1 downloads) 1 year old
    Posted 1 year ago #
  6. OnePressTech
    Member

    I noticed that your name appears against a custom polylang shortcode in GitHub. If you have php skills and you want to call a custom shortcode from the theme home page placed in the header, use a child theme. That's what I do.

    I wish you well getting this working as you want. I apologise but I won't be able to assist you further with this. I have only chosen to allocate my free time to help people with theme bugs and your issue is not a theme bug.

    Good luck...let the MSMW community know when you get it working how you accomplished it...share the knowledge :-)

    Posted 1 year ago #
  7. Hello OnePressTech,

    i solved the problem with the polylang plugin in q quite simple way, because i realized, that two diffentent functions create an identical shortcode. Thatswhy i simply changed the name of the shortcode.

    But i have no php skills. So i am not able to create a php function to call the intro on the front page. I thought maybe the intro for the front page is existing and has simply to be activated. But that seems not to be...

    So if i find a solution i will post it right here.

    So thank you for your support.
    Regards
    Colin

    Posted 1 year ago #
  8. OnePressTech
    Member

    As you are finding out, tweaking a theme with CSS is quite straight-forward, re-arranging areas on the pages is another thing entirely. I am creating a public fork of the MSMW themes and will be adjusting it for better header customisation support...but that enhancement won't be available for 2-3 months...if you can wait that long. If not, let us know how you go.

    Cheers,
    Tim

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme