- This topic has 25 replies, 5 voices, and was last updated 3 months, 3 weeks ago by
Tom.
-
AuthorPosts
-
November 3, 2020 at 9:56 am #1516533
Alfonso
Hello,
I need to add image on mobile header on the right of screen.
How i can do that??
This is my website:
https://www.delahuertacasa.com
Thanks
November 3, 2020 at 10:06 am #1516555Leo
StaffCustomer SupportHi there,
What kind of image?
You want to add it beside the search icon?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 3, 2020 at 10:11 am #1516565Alfonso
Hi Leo,
this is the imagen that i need to add:
https://snipboard.io/YyVez2.jpg
Is a svg file.
This svg file is added whis this snippet on desktop layout:
add_filter( ‘generate_logo_output’, ‘tu_logo_class’, 10, 3 );
function tu_logo_class( $output, $logo_url, $html_attr ) {
printf(
‘‘,
esc_url( apply_filters( ‘generate_logo_href’ , home_url( ‘/’ ) ) ),
esc_attr( apply_filters( ‘generate_logo_title’, get_bloginfo( ‘name’, ‘display’ ) ) ),
$html_attr
);
}The ideal is on the right of the toogle menu button
November 3, 2020 at 5:36 pm #1517007Leo
StaffCustomer SupportTry this solution here:
https://generatepress.com/forums/topic/add-link-before-woo-cart-on-mobile-menu/#post-1506832Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 4, 2020 at 2:22 am #1517313Alfonso
Hi Leo,
Thanks for your reply, may be a good solution. Im tried all mobile hooks but I have not managed to place my content after the toogle menu
November 4, 2020 at 3:43 am #1517427David
StaffCustomer SupportHi there,
why not add the Image inside you Header Element, after the slider, then we can use some CSS to absolutely position it relative to the header element ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 4, 2020 at 4:48 am #1517471Alfonso
Is not possible to make the same with CSS and adding in generate_inside_mobile_menu_bar ??
https://www.staging8.delahuertacasa.com/
I need to display on the right like this screenshot
November 4, 2020 at 6:27 am #1517578David
StaffCustomer SupportDo you want to remove the Cart and Search icons then ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 4, 2020 at 7:22 am #1517830Alfonso
At the moment, no.
Thanks!
November 4, 2020 at 1:16 pm #1518248Tom
Lead DeveloperLead DeveloperHi there,
You could try adding it to the
generate_inside_mobile_header
hook using our Hook Elements:<img src="URL TO YOUR IMAGE" class="mobile-header-custom-image" alt="" />
Then you should be able to do this:
.mobile-header-custom-image { position: absolute; top: 5px; right: 5px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 4, 2020 at 1:24 pm #1518262Alfonso
November 5, 2020 at 9:16 am #1519411Tom
Lead DeveloperLead DeveloperAre you wanting to keep the mobile toggle, search and cart icons on the right?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 5, 2020 at 9:18 am #1519412Alfonso
yes, right before my svg image
November 5, 2020 at 12:22 pm #1519651Tom
Lead DeveloperLead DeveloperIn that case, what if you use the
generate_menu_bar_items
hook?Then do this:
.mobile-header-custom-image { display: none; } #mobile-header .mobile-header-custom-image { display: block; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 5, 2020 at 12:35 pm #1519671Alfonso
-
AuthorPosts
- You must be logged in to reply to this topic.