Site logo

Archived topic

simple single-page-pagination

15 replies · Started by Boris on April 3, 2022

Viewing posts 1–15 of 16

Dear Team,
Is there a way to create this kind of single-page pagination with GP?

Two simple arrows left and right. As often found in sliders.
Similar to this plugin:https://en-gb.wordpress.org/plugins/single-page-pagination

Unfortunately I have not been successful with my attempts so far.

Thank you for your thoughts

Hi Ying,

Thank you for directing me to the Block elements!
I missed this development somehow... There are great opportunities here!

Now I only have problems with the correct CCS code for the position. Please can you give me a hint?

Thank you

Hi Ying, Thank you for the support!

I am trying to rebuild something like this video-slider with GP /Block Element:
(*private field)

Now only the position of the arrows is the last open question.
Is it even possible to make them floating?

Thanks and best regards,
Boris

Hi there,

if i understand correctly, on your single post you would like < and > for next and previous posts - and they should be 'floated' either side of the post content.

If so can you begin by following the article on Block Element - Post Pagination that Ying provided. Once its in place and you can see its working, let us know and we can take a look at the CSS required to fix it in the position you want.

Hi David,

Thanks for the support!

if i understand correctly, on your single post you would like < and > for next and previous posts – and they should be ‘floated’ either side of the post content.

Right this is the idea.
“floated” = sticky, it should stay in place when we scroll up or down.

In the private field is a link to an example page. Now only the CSS for the right position is missing.

Thanks and best regards,
Boris

Hmmm... ok.
Instead of all the Grids and Container Blocks.

Could you simply use a Buttons Block with 2 x Buttons.
Then select the Buttons Block ( the outer wrapper block, not the button themselves ) and in Advanced > Additional CSS Class(es) add: custom-post-nav

That will make the HTML a lot lighter and easier to work with.

Hmm.. I am sorry, but I don’t understand your suggestion:

Could you simply use a Buttons Block with 2 x Buttons.
Then select the Buttons Block ( the outer wrapper block, not the button themselves ) and in Advanced > Additional CSS Class(es) add: custom-post-nav

Thank you and best regards,
Boris

In your Block Element.
Remove any blocks you have.
Then add a GenerateBlocks Button Block:

https://docs.generateblocks.com/article/buttons-overview/

When you add the block it creates an outer Block ie. Buttons and inside that a button.
You need to select the outer Buttons and go to Advanced > Additional CSS Class(es) and add custom-post-nav

Hi David,

Thank you for the prompt reply!
I will try it out ...

Thanks and best regards,
Boris

Let us know :)

Hi David,

Unfortunately I can't get the arrows to the desired position - preferably floating:

..on your single post you would like < and > for next and previous posts – and they should be ‘floated’ either side of the post content.

Can you help?

I don't think I fully understand the concept of the ELEMENT yet.

Thanks and best regards,
Boris

Hi Boris,

1. Remove the custom-post-nav class from the 2 buttonblock, keep it for the buttonsblock.

2. Add this CSS:

.custom-post-nav {
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    justify-content: space-between;
}

main#main {
    position: relative;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Hi Ying,

Thanks!

Hey, now I'm on the right track! Almost there..
Thank you all for your support and patience!

Best regards,
Boris

This archived topic is closed to new replies.