Archives

Home Forums Search Search Results for 'generate_inside_mobile_header'

Search Results for 'generate_inside_mobile_header'

Home Forums Search Search Results for 'generate_inside_mobile_header'

Viewing 15 results - 1 through 15 (of 129 total)
  • Author
    Search Results
  • Michelle

    Yes, the logo is added through Elements and snippets for one category and one page. I’d also like it to work on that Category’s post pages (Single) and for that Category’s archive. Here’s what I have:

    Elements: generate_inside_mobile_header

    <style>
    nav#mobile-header.is_stuck {
        margin-top: 39px !important;
    	padding-left:  30px;
    	padding-right: 20px;
    		padding-top:  15px;
    	padding-bottom: 8px;
    }
    </style>

    Also: Elements Header

    I uploaded my category logo with “No Merge”
    Container: Contained
    Inner Container: Contained

    Snippet:

    
    /*Replace site logo with category logo for page id 6619*/
    
    add_filter('generate_sticky_navigation_logo_output',function($output, $img_src, $image){
    	if( 6619 === get_the_ID() ){
    		$my_url = 'https://www.reachingmyworld.com/i-put-my-page-url-here';
    		$logo_src = 'https://i-put-my-logo-url-here.svg';
    		$width = '150px';
    		$height = '150px';
    		return sprintf(
    				'<div class="sticky-navigation-logo">
    					<a href="%1$s" title="%2$s" rel="home">
    						<img src="%3$s" alt="%2$s" width="%4$s" height="%5$s" />
    					</a>
    				</div>',
    				$my_url,
    				get_bloginfo( 'name', 'display' ),
    				$logo_src,
    				$width,
    				$height
    			);
    	}
    	return $output;
    }, 10, 3);
    #2221006

    In reply to: Error with GP-Premium

    sam

    Hi,

    We have multiple hooks these include
    wp_head
    generate_inside_mobile_header
    generate_after_header
    generate_after_right_sidebar_content
    generate_before_right_sidebar_content
    generate_after_main_content
    wp_footer
    generate_before_entry_title
    generate_before_footer

    Another thing to add is these have been changed in a while and we have another site with the same elements and it works fine.

    Thanks

    #2128230
    Ying
    Staff
    Customer Support

    I misread your request, can you change the hook to generate_inside_mobile_header?

    #2117704
    Lucas

    Hello,

    I’m trying to integrate an extra element after the main navigation.
    Which has some elements within it that have an ID associated to them which I need to call for some jQuery (for dropdown functionality).

    But I can’t find a way to implement my extra element with the current hooks.
    Because most of them make it so the element is loaded in both the mobile menu as in the desktop version.
    Which makes it so my ID specific code not to work on my element, because it is being loaded in twice.

    The closest thing I got is the following.
    Use the generate_inside_navigation to load in for desktop.
    And use the generate_inside_mobile_header to load in for mobile.
    But the issue here is for desktop the element is loaded in before the main navigation.
    I’m able to change the order of these elements using CSS but this will make tabbing through the navigation go in a strange order.
    It would be better if it would be in the correct flow.

    Is there a way for me to make it so I can load in the code separate for mobile and desktop with the standard hooks within Generatepress?
    I rather avoid adding custom hooks if necessary.

    Thanks in advance

    #2090289

    In reply to: Mobile menu animation

    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Just to confirm, have you added this line?:

    add_action( 'generate_inside_mobile_header_menu', 'tu_add_animated_hamburger_markup' );

    #2079646
    Gilad Gafni

    Resolved by using generate_after_navigation for desktop and generate_inside_mobile_header for mobile.

    #2020076
    [Resolved]

    Topic: Double hooks on mobile header

    in forum Support
    Gwyneth

    Hello. I set up two elements hooks with a button link to my scheduler. One to show on screen header and one on mobile only. But both buttons are now showing on mobile. This did not used to happen and I have not changed anything. The two elements I am using are: generate_inside_mobile_header and generate_after_primary_menu How do I set the second one so that it does not display in the mobile header? My site is https://efthelps.com

    #2019098
    Anirudh

    Hi Elvin,

    We are not on the same page and sorry for not explaining the issue in detail. What I want is to create a div below the header on mobile screens only. I want to achieve this as in the current setup my CLS score is being spoilt due to the header Ad on mobiles.

    To achieve this, I activated Menu Plus and Mobile Header. Then I created a hook with the title Mobile Header Ad and then used generate_inside_mobile_header in the setting. In the hook I added a div with the class “Mobile_Header_Ad” and added dummy content “ABCD”. To test this, I activated the hook on only one post with the url: https://learnodo-newtonic.com/james-bond-facts. However, the content (“ABCD”) is being displayed in between the logo and menu. I want to display it below them.

    I plan to ask my Ad network to target this div on mobile screens so that my CLS score improves.

    I hope this makes things clear,
    Thanks,
    Ani.

    #2014075
    Martin

    I’m trying to get a 2 line mobile header:

    Doctor's name, PhD           ---
    Licensed Psychologist        ---

    so just the two lines of text and the hamburger menu icon on the right.
    I tried a block hook with ‘generate_inside_mobile_header’ but the menu icon is pushed down below the 2nd line of text?

    I want to float the menu icon to the right.

    I need it to look the same on the portrait iPad as well.

    #1959527

    In reply to: Header Element Layer

    Elvin
    Staff
    Customer Support

    Hi there,

    You can try this CSS:

    .page-hero picture {
        left: 0;
        top: 0;
        position: absolute;
    }
    
    .page-hero {
        position: relative;
    }

    But if you want it to be added right beside the navigation then you should hook it in through generate_inside_navigation for desktop and generate_inside_mobile_header for mobile header. And then let us check the site if it messes up the layout alignment. 😀

    A wise man once said:
    "Have you cleared your cache?"

    #1956666
    Stéphane

    Hi Elvin,

    Can you link us to the site in question? To inspect how the header is structure so we have an idea which hooks to recommend.

    Sure. I’ll put it in the private information of this thread.

    generate_inside_mobile_header only works if you have Mobile Header enabled on Appearance > Customize > Layout > Header.

    It was and is enabled.

    Best regards, Stéphane

    #1956659
    Elvin
    Staff
    Customer Support

    Hi Stéphane,

    Can you link us to the site in question? To inspect how the header is structure so we have an idea which hooks to recommend.

    generate_inside_mobile_header only works if you have Mobile Header enabled on Appearance > Customize > Layout > Header.

    A wise man once said:
    "Have you cleared your cache?"

    #1956652
    [Support request]

    Topic: Adding buttons in mobile menu

    in forum Support
    Stéphane

    Hello,

    I have a few buttons in my desktop navbar/menu; they work all right. I inserted them by creating elements with the generate_menu_bar_items hook.

    However, they don’t show up in my mobile navbar/menu. I tried all mobile hooks that looked like potential candidates – generate_inside_mobile_menu, generate_inside_mobile_menu_bar, generate_inside_mobile_header, generate_after_mobile_menu_button, generate_inside_mobile_menu_control_wrapper – but none of them added the buttons in the mobile menu. Is there a hook to achieve what I want here? Am I doing something wrong?

    Best regards, Stéphane

    #1947797
    Elvin
    Staff
    Customer Support

    That sounds weird to me, I already clear all cache and it works fine on both phone and laptop. How about just focus on the main question please, please suggest some custom css for it.I will check the site on another device.

    We ask for the URL to inspect the page to see how the page is structured. Some GP sites use a separate custom mobile header while some sites don’t.

    We won’t be able to know if the suggestion is correct if we can’t inspect the site (or atleast see the template used). We’re basically guessing if we can’t check the site to inspect it for the correct selectors. 🙂

    Here is the recent record: https://www.loom.com/share/8d1ccbb797bd4555a83dde4361c55b4a

    This is good. This atleast gives us an idea that your site is using Ethos. 😀

    Assuming the template is intact, you can try this CSS to center the logo.

    .site-logo.mobile-header-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    As for the right contact button, you can hook it in on generate_inside_mobile_header. let me know if you’ve hooked it to fix the layout using custom CSS. 😀

    A wise man once said:
    "Have you cleared your cache?"

    #1925892
    Bandara

    I’m using the generate_inside_mobile_header hook to insert some text but I can’t figure out how to make it left justified instead of right. I’m sure it must be something simple, but I’m missing it. I have a logo on the far left and I want to keep the hamburger icon on the right.

Viewing 15 results - 1 through 15 (of 129 total)