Site logo

Archived topic

Place right sidebar (mobile view) between two hooks

16 replies · Started by Alejandro on February 20, 2021

Viewing posts 1–15 of 17

Hi!
Is there any solution to place the right sidebar (mobile view) between two hooks?
I am thinking between generate_before_footer and generate_before_footer_content

Thanks in advance

hi, any thoughts on this ticket?
Thank you!

Hi there,

apologies that your first topic slipped through our system.

There isn't a simple way to move a Sidebar from its current position for a specific device size without either:

1. Using Javascript on the front end.
2. Hooking in a Separate Sidebar specifically for Mobile view.

What exactly are you trying to achieve by moving it ?

Hi David,
No problem!
Well, What I am trying to achieve is what you see HERE

I do have main content+right sidebar (no left sidebar at all), so I would like to "extend"the generate_before_comments hook. This way, the content would cover all the screen width in desktop view and the right sidebar would fall right after the content section and before the comments, that would be place in the bottom of the page.

Thank you!

Yes, correct, I opened it and solved it partially. The thing is that NOW, everything look fine in desktop but not in mobile view.
This is why I am asking about this solution.

So moving the comments positions the sidebar where you require it for Mobile ? If so whats the issue ? Can you share a link ?

Here it goes:
http://www.proyectoviajero.com

You'll notice that the share links area and the next / previous post area have the same with (desktop view) than the container. And I would like to make them full width.

Right now, the only solution I have is to hook them in the footer hooks. But if I do so, they'll fall right to the bottom in mobile view (after related posts, etc) which would be weird.

Thank you

Hi Alejandro,

Sorry if I miss anything, but I don't quite follow your instruction on finding the share links area and the next/previous post area, are they located in single post page?

Let me know :)

Look for this text -> Te Ha Gustado El Post? Guarda El Pin!
It is right under it!

You could try use generate_before_footer, then use some CSS to re-order it.

Where exactly you want this section to be positioned in mobile?

Right now both in mobile and in desktop is positioned correctly.
The only thing I would like to achieve is have (desktop view) the div covering 100% screen width.

See this HERE

Thanks!

Unfortuanly if you want it to maintain its position in the content area, it's not possible to make it full width.

But you could try use the same hook as GRACIAS POR LEER section. By adjusting its priority to re-order the hooks.

So... this is what I was asking if I could place the sidebar within 2 hooks. If yes, I could design any elements after the post main container in desktop view and place the sidebar whenever I want in mobile view.

Do you have a solution for this?

Thank you

Unfortuanly no, we can't move sidebar in to these 2 hooks without custom solition.

This archived topic is closed to new replies.