- This topic has 27 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 18, 2023 at 12:56 am #2499759
Ajay
i an using generatblocks pro where i can see the option of sticky post suppose i want to display 4-5 sticky post on homepage with all posts what should i do for example this website please check in private box
January 18, 2023 at 1:15 am #2499780Fernando Customer Support
It’s possible but you’ll need to exclude the sticky posts for the homepage on your Current Query Loop.
Then, create a new loop for the sticky posts. We’ll need custom code to make sure it grabs only 5.
Alternatively, you can just opt to include the sticky posts manually in the parameters. This could work as well.
January 18, 2023 at 1:57 am #2499813Ajay
alright but what if i want to stick search bar on the top while scrolling up the page posts
January 18, 2023 at 2:47 am #2499868Ajay
code is not working in related posts please look in private box
January 18, 2023 at 9:46 am #2500553David
StaffCustomer SupportIf it works on one Query Loop, then copy that query loop block and use it on your other pages. Then the CSS will work.
January 18, 2023 at 9:32 pm #2500991Ajay
nope it is not working
January 18, 2023 at 10:31 pm #2501026Fernando Customer Support
The site seems to be currently under maintenance. We can’t view it. Can you disable that setting temporarily so we can see why it’s not working?
January 18, 2023 at 10:40 pm #2501030Ajay
oh sorry now please check
January 18, 2023 at 11:21 pm #2501062Fernando Customer Support
Add
cu-query-loopto the class list of the Grid Block under the Query Loop Block.Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
Then, add this CSS instead:
.gb-grid-wrapper.gb-query-loop-wrapper.cu-query-loop .gb-query-loop-item > .gb-container .gb-inside-container { height: 100%; display: flex; flex-direction: column; } .gb-grid-wrapper.gb-query-loop-wrapper.cu-query-loop .gb-query-loop-item > .gb-container .gb-inside-container > *:nth-last-child(2) { margin-top: auto; }January 18, 2023 at 11:32 pm #2501070Ajay
but what should i do with your before code?
January 18, 2023 at 11:35 pm #2501072Fernando Customer Support
You can remove it. Just make sure to add
cu-query-loopto all Grids under a Query Loop with the same structure.The new code should work for all GB Query Loops with an identical structure provided that this class exists.
January 19, 2023 at 1:18 am #2501140Ajay
thanku so much code is working. i have 2 questions-
1st- how can I make search box sticky on the top as it is while scrolling up the page?
2nd – how can I make menu bar navigation pages a s a button so I could control that in generateblocks pro?/
January 19, 2023 at 1:40 am #2501158Fernando Customer Support
Can you open new topics for these two new inquiries? We’ll do our best to assist you afterward.
-
AuthorPosts
- You must be logged in to reply to this topic.